Comments (4)
The multi-line strings bug appears probably because you're running an old version from the command line. Check your PATH
.
The other two I can confirm. I was pretty sure this was tested already, but apparently not strictly enough. Should be easy to fix, though.
from luaparse.
I installed it via npm i -g luaparse
, the luaparse --v
says "luaparse v0.2.1".
The other two I can confirm.
btw I added 2 more cases up there, just in case since you haven't noticed.
For the sake of completeness, the following is valid in LuaJIT (not sure about vanilla Lua):
s="1\
2"print(string.byte(s,1,#s))
Outputs:
49 10 50
By using \
followed by newline (CR/LR or both), it is substituted with \n
(LF) char.
from luaparse.
Yes, the version available from npm is not fixed. Latest git master at least handles multi-line strings correctly.
from luaparse.
Fixed in 28afaef d49b641 c3e11ee.
(That should teach me not to work on several things at once.)
from luaparse.
Related Issues (20)
- Semicolons after break statement unrecognized HOT 3
- StringLiteral.value is sometimes null HOT 1
- Add an event/notification when a function definition begins
- How to parse json back to lua? HOT 1
- Lua floor division operator not recognised HOT 1
- lua fails to parse with custom type definitions HOT 1
- How to pass the ast to escodegen.generate to make js code? HOT 1
- Incorrect parsing for return statements HOT 1
- do luaparse support bit opratation? HOT 1
- Incorrect parsing parens indiscriminately removed
- Incorrect parsing: semicolon indiscriminately removed
- Syntax error though code is valid HOT 2
- Fail to reject an invalid literal string
- The string literal's value is not passed properly. HOT 1
- Issue with unicode characters
- support for ?. operator data?.files
- onLocalDeclaration not being called HOT 1
- Any chance for bundled TypeScript definitions? HOT 3
- Support LuaJIT syntax extensions HOT 1
- Bitwize brackets disappears HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luaparse.