Subscript Versions Save

Fast and tiny expression evaluator with minimal syntax.

v8.0.0

2 months ago

What's Changed

  • Pluggable language features
  • Standardized common syntax
  • Added assignment operators += -= *= /= %=
  • Flatten code - no set, no wrappers
  • Generic access node handling
  • Simplified primitives wrapping [,true] vs ['',true]
  • a?.valueOf?.() context calls support
  • Misc. fixes

Full Changelog: https://github.com/dy/subscript/compare/v7.4.0...v8.0.0

v7.4.5

9 months ago
  • Fixed nary
  • More complete tests
  • Added skip argument to nary
  • Better error display
  • Type definitions
  • Rassoc precedence is half, not full

Full Changelog: https://github.com/dy/subscript/compare/v7.4.4...v7.4.5

v7.1.1

2 years ago
  • Add explicit parse.unary, parse.binary and parse.nary registerers
  • Add redefinable parse.id and parse.space

v7.0.0

2 years ago
  • Reintroduces AST/calltree as intermediary layer for better optimizations, extensibility and interop.
  • Better registering fn.
  • +10% parsing performance (170ms → 150ms)
  • +20% eval performance (17ms → 13ms)
  • +30% size (1kb → 1.3kb)

Full Changelog: https://github.com/spectjs/subscript/compare/v6.4.0...v7.0.0

v6.1.0

2 years ago
  • Collect & expose found arguments
  • Better error messages
  • Removed tagged literal

Full Changelog: https://github.com/spectjs/subscript/compare/v6.0.0...v6.1.0

v6.0.0

2 years ago

What's Changed

  • Direct evals as result of parsing.
  • No lisp tree layer.
  • Tokens and comments are parsed from lookup table.
  • Single set method for defining operators or parsers.
  • Postfix unaries are now custom parsers.
  • Removed code, char functions.
  • No fancy literal wrappers or string prefixes.
  • Size -20% (2.5 → 2kb)
  • Parsing perf +20% (200 → 160ms)
  • Eval perf +50% (30 → 15ms)

Full Changelog: https://github.com/spectjs/subscript/compare/v5.5.2...v6.0.0

v5.5.2

2 years ago

What's Changed

  • ×3 faster eval due to flat reducer & fn type detection
  • evaluate.operator is a function on par with parse.operator
  • split core and subscript and justin configurators
  • string, literal tokens are unary operators
  • literals handling
  • word operators are externalized
  • more tests
  • strings are prefixed with @ only, no "" tokens

Full Changelog: https://github.com/spectjs/subscript/compare/v5.0.0...v5.5.2

v5.0.0

2 years ago

What's Changed

  • Direct lookup table instead of precedence ascend
  • Precedences match MDN
  • Added operator function to create any operators or tokens
  • Group/array are operators, not tokens
  • Performance +30% (260 → 200ms)
  • Size -10% (2.8 → 2.5kb)

Full Changelog: https://github.com/spectjs/subscript/compare/v4.0.0...v5.0.0

v4.0.0

2 years ago

What's changed

  • Functional parsers precedence table;
  • Fast char lookup table;
  • Improved performance by 25%;
  • Space/comments;
  • Correct ternary parser;
  • Correct errors detection;
  • Optimized expression parsing algorithm (merged prefix, postfix & binary);
  • All JSEP tests;

Full Changelog: https://github.com/spectjs/subscript/compare/v3.0.0...v4.0.0

v3.0.0

2 years ago

What's Changed

  • Significantly increased performance (on par with jsep or faster for major cases)
  • Extensible functional parsers instead of declarative configs
  • Operators precedence matches JS
  • Better source files layout
  • Postfix operators support
  • Smaller size
  • Node tests

Full Changelog: https://github.com/spectjs/subscript/compare/v2.0.0...v3.0.0