Features / Breaking Changes
-
Removed
norswap.autumn.util.TestFixture
in favour ofnorswap.utils.TestFixture
. The former was a copy of the later, only included because I couldn't refer to the Javadoc of the original. This is now fixed, so the copy has to go. -
Renamed
norswap.autumn.TestFixture
tonorswap.autumn.AutumnTestFixture
, to reduce confusion. -
All the
prefixExpect
andsuccessExpect
methods inAutumnTestFixture
now expect the value stack to have a size of exactly 1.(This is generally what you want, but in the case where you really need to deal with a larger stack, you can always use something like
rule = ruleToTest.push($ -> $.get(-1));
to only preserve the top of the stack. If you want to compare the whole stack, userule = ruleToTest.push($ -> $.$list());
.)
Features
- Let
LineMap
carry the input name (file name), and refactor existing functions that used to take a separate file name accordingly. - Made
TestFixture#map
visible and user-assignable. - Introduce
LineMap#stringWithName(int offset)
and a static version thereof. - Introduce instance methods of existing static
LineMap#string
methods. - Added
Span#startString()
Grammar#makeRuleNames()
is now public and now also set names for parsers in parent classes.
Breaking Changes
- The constructors for
LineMapString
andLineMapTokens
take an extra string (the input name) as first argument. - The
filePath
argument was removed from every function formatting function that had it inParseResult
. - Renamed
TestFixture#filePath
toinputName
. - Remove
Grammar#makeRuleNames(Class)
.
Features
StringChoice
parser to optimize the reserved word / identifier system.
Bugfixes
TestFixture
used withrule
would not trigger automatic rule name assignment.- Fix a bug in
LineMapString#lineSnippet
when using hard tabs.
Features
- Define overloads for
LeftExpressionBuilder#{infix, suffix}
andRightExpressionBuilder#{infix, prefix}
which do not take a stack action. - Added
ActionContext#get(int)
andActionContext#pushAll(Object...)
. - Add a new reserved word / identifier system:
Grammar#id_part
,Grammar#reserved
,Grammar#identifier
.
Misc
- Updated to
norswap.utils
v2.1.2
- Initial public release.