All Versions
9
Latest Version
Avg Release Cycle
95 days
Latest Release
87 days ago

Changelog History

  • v0.7.0

    March 09, 2020

    📜 [#82] PHP 7.4
    📜 [#93] Wrong line number when parsing string
    📜 [#91] Scanner doesn't support \x80-\xff identifiers
    📜 [#86] JsonDumper don't work
    🖨 [#78] Print echo
    📜 [#80] Ragel based lexer

  • v0.6.1

    August 20, 2019

    📜 #96 handle lexer errors

  • v0.6.0

    February 25, 2019

    🆕 new

    golang/json dumper
    🖨 saving and printing free-floating comments and whitespaces

    nodes

    🚚 attribute StringVar was removed from expr.Variable
    🚚 node stmt.Die was removed, added Die attribute to stmt.Exit instead

    optimizations

    💾 save position within node
    🔀 use sync.Pool to reuse scanner.Token

    🛠 bugfix

    __halt_compiler(); terminates parsing process
    accept backslash+newline in single quotes
    🛠 fixed /*/ comment termination
    🛠 fixed crash on an empty list item, missed items are represented by empty *expr.ArrayItem

  • v0.5.1

    July 03, 2018

    🚚 #44: if array item list ends by a comma, last nil does not removed
    📜 #44: fixed crash on an empty list item
    🏗 #41: Namespace resolver now does not resolve build-in primitives
    🛠 Fixed bug: Namespace resolver fails when TraitUse does not contain adaptations
    🔀 #40: memory allocations reduced for position.Position by using sync.Pool
    🔀 #27: memory allocations reduced for scanner.Token by using sync.Pool
    📜 #26: TrimLeft replaced by TrimLeftFunc (small optimization)
    📜 #38: fixed saving positions for php5 ArrayDimFetch, PropertyFetch and MethodCall nodes
    📜 #34: fixed saving position for Class node

  • v0.5.0

    June 07, 2018

    ✨ Enhancements:

    • 📜 Error-tolerant parsing
    • 📜 Possibility to parse files concurrently
    • Saving all comments
    • Saving comments position

    💥 Breaking changes:

    • ✂ Removed DocComment and PlainComment types
    • ✂ Removed boolWithToken, altSintaxNode, nodesWithEndToken types
    • Created node.Root, node.ArgumentList, stmt.TraitAdaptationList, stmt.CaseList, stmt.ClassExtends, stmt.ClassImplements, stmt.InterfaceExtends, expr.Reference nodes
    • 🔄 Changed ClosureUse node purpose, now it represents variables list instead of wrapping the variable
    • 🏗 Builder was renamed to PositionBuilder
    • scanner.CreateToken returns pointer
    • scanner.Token saves position as position.Position
    • 📦 Parser interface moved to parser package
    • 📦 token package merged into scanner package
    • 📦 Positions and Comments moved into parser package

    🛠 Fixes:

    • scanner: added (binary) cast
    • 📜 #28 fixed race conditions
    • 🚚 #18 heredocLabelvariable moved from global into scanner.Lexer
    • 🛠 fixed panic on 32-bit systems
    • 🛠 fixed bug when scanning an empty inline comment
    • 🛠 fixed namespace resolver fail on anonymous class
    • 🛠 fixed the saving non-latin comments

    Optimisations:

    • ♻️ #21 refactored scanner.Lexer.charsToBytes and renamed to scanner.Lexer.tokenString
  • v0.4.0

    April 06, 2018

    🖨 Created simple pretty printer
    Created Heredoc node
    🛠 Fixed Heredoc scanning
    🛠 Fixed template strings and backquoted strings scanning
    Dumper now writes to io.writer
    ✂ Removed redundant nop before InlineHtml
    📇 Renamed assign.AssignRef to assign.Reference
    🚚 Renamed cast nodes, remove Cast prefix

  • v0.3.0

    March 01, 2018

    Namespace resolver

    Namespace resolver is a visitor that traverses nodes and resolves name nodes as fully qualified names.
    It does not change AST but collects resolved names into map[node.Node]string

    For Class, Interface, Trait, Function, ConstList nodes collects name with current namespace.
    For Name, Relative, 'FullyQualified' nodes resolves use aliases and collects a fully qualified name.

    Other changes

    • ✂ Remove the underscore from package names
    • 🛠 Fix goreportcard.com warnings
    • 📇 Rename Walker to Walkable interface
    • ➕ Add Names interface
    • ➕ Add dumper and namespace_resolver tests
  • v0.2.0

    February 28, 2018

    ➕ Add PHP5 parsing rules tests
    ➕ Add PHP7 parsing rules tests
    ➕ Add lexer rules tests
    ➕ Add node traversing tests
    ➕ Add alternative syntax nodes for while, for, foreach, and switch
    🛠 Fix parsing bugs found by test

  • v0.1.0

    February 06, 2018