v0.9.0
- Introduces
$
as a value label prefix. The value label indicates that the prefixed expression is a value. Any value may be labeled, but the value label is required for string literals, number literals,true
,false
, andnull
, but only when used in a context where the value could accidentally be interpreted as a parser. For examplerecord2(Key1, value1, Key2, value2)
used to be callable asrecord2("foo", foo_value, "bar", bar_value)
, but now must be invoked asrecord2($"foo", foo_value, $"bar", bar_value)
. This makes it explicit that"foo"
and"bar"
are string values, not parsers. - Improve
json_string
parser, add a bunch of tests for handling encoding/decoding edge cases. - Add
@Codepoint(HexStr)
meta function to convert a hexadecimal number encoded as a string into a UTF-8 unicode codepoint. - and
@SurrogatePairCodepoint(High, Low)
meta functions to convert two hexadecimal numbers encoded as strings into a UTF-16 surrogate pair codepoint. - Add
hex_numeral
,hex_digit
,find_all(p)
,maybe_find_all(p)
,chars_until(stop)
,json_number
,json_boolean
, andjson_null
to the standard library. - Add
True
,False
,Null
,Inc(N)
,Dec(N)
to the standard library. - Change
ast_op_precedence(op_node, BindingPower)
toAstOpPrecedence(OpNode, BindingPower)
and changeast_infix_op_precedence(op_node, LeftBindingPower, RightBindingPower)
toAstInfixOpPrecedence(OpNode, LeftBindingPower, RightBindingPower)
. Unfortunately the value label change made precedence parsing code look noisier, since all the binding power numbers had to be prefixed with$
. Using value functions is a bit better.
Full Changelog: v0.8.0...v0.9.0