berp
berp copied to clipboard
Various Java razor improvements
I made a couple of improvements to the razor file for Java. This make the file usable out of the box.
- Constructor name should be equal to the class name
- Moved the comments to avoid whitespace at start of file
- Made fields, classes and methods package private to avoid exposing parser in public API
- Replaced dedicated
ITokenScannerinterface withIterator<Token>andIterable<Token> - Renamed
TokenMatchertoSimpleTokenMatcher - Renamed
ITokenMatchertoTokenMatcherto fit with Java standards - Added
Funcclass. - Redid
parsemethod arguments. TheReaderinterface isn't the right tool here. It only allows individual bytes to be read rather then codepoints.