Releases: boolangery/py-lua-parser
Releases · boolangery/py-lua-parser
4.0.0
Breaking changes
- Use encoding utf-8 not local encoding when reading source files by @thiliapr in #69
- Store unescaped string in String AST node by @wfdewith in #65
* s: String value in bytes.
* raw: Unescaped string - Parser now fail on unknown token instead of skipping it (#68)
Fixes
- Fix incorrect long string parsing (#72)
- Fix incorrect table constructor AST (#70)
- Removed 'continue' keyword from syntax (#67)
- Fix chained calls AST (#66)
New Contributors
Full Changelog: 3.3.1...4.0.0
3.3.1
What's Changed
- Get rid of printing AST from parse() by @cogito123 in #62
- Fixed rendering numeric concatenation. Added numeric concatenation test. by @acureau in #63
New Contributors
- @cogito123 made their first contribution in #62
- @acureau made their first contribution in #63
Full Changelog: 3.3.0...3.3.1
3.3.0
What's Changed
- Updated Antlr4 grammar to use latest one (https://github.com/antlr/grammars-v4/tree/master/lua)
- Add support for Lua 5.4 attributes, new Node
Attribute - Build AST using antlr visitor instead of re-reading all tokens, should improve performance
Fixes
3.2.1
3.1.1
What's Changed
- Fix lua ouput indenter by @penguinol in #25
- Feature/support pickling nodes by @ypaliy-vdoo in #20
Full Changelog: 3.1.0...3.1.1
3.1.0
New feature
- each node now contains line infomation and start/stop token
class Node:
"""Base class for AST node."""
comments: Comments
first_token: Optional[Token]
last_token: Optional[Token]
start_char: Optional[int]
stop_char: Optional[int]
line: Optional[int]3.0.1
3.0.0
Breaking changes
Index node
Index.idx use now a Name node instead of a String node:
Before: Index(idx=String('a'), value=Name('x'))
Now: Index(idx=Name('a'), value=Name('x'))
New features
- Index node: add notation property:
index_node.notation
class IndexNotation(Enum):
DOT = 0 # obj.foo
SQUARE = 1 # obj[foo]- String node: add delimiter information
string_node.delimiter
class StringDelimiter(Enum):
SINGLE_QUOTE = 0 # 'foo'
DOUBLE_QUOTE = 1 # "foo"
DOUBLE_SQUARE = 2 # [[foo]]- add a lua source printer
Fixes
- cant walk the ast tree in some cases.
- Merge pull request #7 from NanakiPL/master
- named an unnamed exception
- tests: add lua printer tests.