Skip to content

Releases: conflowio/parsley

0.17.0

30 Oct 21:06
a28c260
Compare
Choose a tag to compare

Package moved from github.com/opsidian/parsley to github.com/conflowio/parsley

OTHER:

  • Use Go 1.17
  • Add linting using golangci-lint

0.16.0

23 Apr 09:44
Compare
Choose a tag to compare

BACKWARDS INCOMPATIBILITIES:

  • Remove Value() from the parsley.Node interface{}, differentiate between literal and non-literal nodes

0.15.0

16 Apr 08:40
Compare
Choose a tag to compare

BACKWARDS INCOMPATIBILITIES:

  • Replace Type() string on parsley.Node with Schema() interface{} to support any user-defined schema
  • Allow to set schema for nil parser

IMPROVEMENTS:

  • Use Go 1.16
  • Move tools dependency file to a subpackage

OTHER:

  • Remove CodeCov integration

0.14.0

26 Oct 19:16
Compare
Choose a tag to compare

BACKWARDS INCOMPATIBILITIES:

  • Remove NL and Whitespaces parsers, these are achievable using the trim parsers
  • Change Trim parsers to always skip all whitespaces and return specific whitespace error
  • In text.LeftTrim prefer a not found parse error over a whitespace error if the position is the same

IMPROVEMENTS:

  • Add struct wrapper for parser functions to allow recursive parser definitions
  • Simplify parsley.Error, remove unnecessary msg field (and therefore unnecessary .Error()
  • Introduce notfound errors when a parser doesn't match
  • Only collect notfound errors in any/choice if they are not in the starting position

0.13.0

08 Nov 21:19
Compare
Choose a tag to compare

BACKWARDS INCOMPATIBILITIES:

  • The parsley.Evaluate function doesn't expect an evaluation context anymore, which was renamed to user context to make it more clear and can be set on parsley.Context
  • Move ast.WalkNode to parsley.Walk
  • The transform functions don't expect a NodeTransformer object anymore (the node transformation must be set on the interpreter)

IMPROVEMENTS:

  • The evaluation context is called user context now and can be set on parsley.Context
  • Proper recursive static checking (depth-first)
  • Proper recursive node transformation support (breadth-first)
  • The static checking and transformation are disabled by default and can be enabled on parsley.Context
  • Add NodeTransformerRegistry interface

0.12.3

08 Nov 21:19
Compare
Choose a tag to compare

IMPROVEMENTS:

  • Add NodeTransformer to context to allow AST transformations
  • The StaticChecker helper should not parse the input (minor backward incompatibility)

0.12.2

04 Nov 23:22
Compare
Choose a tag to compare

BUGFIXES:

  • Do not panic in StaticCheck if there is no interpreter

0.12.1

04 Nov 23:22
Compare
Choose a tag to compare

IMPROVEMENTS:

  • The text types should be constants (e.g. terminal.StringType)

0.12.0

04 Nov 22:09
Compare
Choose a tag to compare

IMPROVEMENTS:

  • Add parsley.NonTerminalNode interface for nonterminal nodes
  • Add parsley.StaticChecker and parsley.StaticCheckable interface for doing static analysis
  • Add type to the AST nodes

BACKWARDS INCOMPATIBILITIES:

  • The parsley.Interpreter's Eval now expects a parsley.NonTerminalNode instead of a list of nodes
  • The ast.NodeList's node methods will run always on the first node only
  • The ast.NilNode was renamed to ast.EmptyNode to avoid confusion
  • The ast.NewTerminalNode now expects a new valueType parameter
  • Most of the text/terminal parsers now will return a custom node type (string node, int node, etc.)

0.11.8

04 Nov 22:10
Compare
Choose a tag to compare

IMPROVEMENTS:

  • Remove the index from the walk function, make it properly recursive