Download Latest Version Ohm v17.2.1 source code.tar.gz (1.8 MB)
Email in envelope

Get an email when there's a new version of Ohm

Home / v17.0.3
Name Modified Size InfoDownloads / Week
Parent folder
Ohm v17.0.3 source code.tar.gz 2023-03-03 998.5 kB
Ohm v17.0.3 source code.zip 2023-03-03 1.6 MB
README.md 2023-03-03 1.9 kB
Totals: 3 Items   2.6 MB 0

NPM Browser bundles: ohm.jsohm.min.js

Release notes

Breaking changes:

  • [#424]: any now consumes an entire code point (i.e., a full Unicode character), not just a single, 16-bit code unit.
  • [55c787b]: The namespace helpers (namespace, extendNamespace) have been removed. (These were always optional.)
  • [bea0be9]: When used as an ES module, the main 'ohm-js' module now has only named exports (i.e., no default export). The same is true for ohm-js/extras.
  • [#395]: In generated type definitions, action dictionary types now inherit from BaseActionDict<T>, a new supertype of ActionDict<T>.
  • [9e32f8d]: ohm.util is removed from the public API. getLineAndColumn and getLineAndColumn have been moved into the extras module.
  • [#398]: Changed the default behavior toAST for the built-in list rules (ListOf and friends). Both the syntactic (ListOf, ...) and lexical versions (listOf, ...) are now represented as arrays, with the separators discarded. Previously, the syntactic versions were represented by arrays, but with separators included, and the lexical versions were represented as strings (just like other lexical rules).

Other notable changes:

  • [#416]: Fix crash when calling toString on a non-root node
  • [13c8991]: The deprecated grammarFromScriptElement and grammarsFromScriptElements functions have been entirely removed.
  • Improvements to the TypeScript types:
  • [#407]: Added types for the built-in asIteration operation
  • [#410]: Added types for Interval.getLineAndColumn
  • [#368]: The primitiveValue property of nodes, which was deprecated in Ohm v16, has now been completely removed.
Source: README.md, updated 2023-03-03