-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Very simple code for demo:
local parser = require('dumbParser')
local ast = parser.parse('print("\\x00")') -- passed string: print("\x00")
--local ast = parser.parseExpression('print("\\x00")') -- same thing
--local ast = parser.parseFile('test.lua') -- same thing
parser.printTree(ast) -- toLua gives the same effect
-- lua51: ... ARG1 literal (string="x00") / Wrong.
-- lua53/luajit: ... ARG1 literal (string="{NUL}") / OK.
local ast = parser.parse('print("\\\\x00")') -- passed string: print("\\x00") / OK
--local ast = parser.parse('print("\\0000")') -- passed string: print("\0000") / OK
--local ast = parser.parse('print("\\1000")') -- passed string: print("\1000") / OK
parser.printTree(ast) -- toLua gives the same effect
-- lua51: ... ARG1 literal (string="\x00") / OK.
-- lua53/luajit: ... ARG1 literal (string="\x00") / OK.This affects the recording of escape characters.
- In Lua5.1 they turn into plain text.
- In Lua5.3 or Luajit there is no such problem.
Metadata
Metadata
Assignees
Labels
No labels