Skip to content

Releases: boolangery/py-lua-parser

3.2.1

11 Feb 18:42
Compare
Choose a tag to compare

What's Changed

  • Statement node is now a descendant of Expression node

Fixes

  • Missing brackets on table #26
  • Nested unary expressions #27
  • Comments in the end of Node will be skipped #28
  • Fail to reject unassigned global variable declaration #29
  • Fail to reject an invalid escape sequence #30

3.1.1

24 May 18:07
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.1.0...3.1.1

3.1.0

09 Nov 07:40
Compare
Choose a tag to compare

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

05 Jun 19:43
Compare
Choose a tag to compare

Bug fixes

  • fix #11: no visitor found for class StringDelimiter
  • fix xml printer

3.0.0

11 Nov 10:24
Compare
Choose a tag to compare

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.