7 Commits

Author SHA1 Message Date
8e25c3d100 lexer, common: More descriptive error messages.
The lexer now tracks the data that has been read since the start of the
current line. While this may have use in parsers, the immediate use is
by the common error reporting procedure.

The `common#error` procedure already reports the column and line number
where an error occurs. The `common#expect` function is broadly used by
parsers and generates the majority of parser errors. It now uses the
lexer's record of the current line to format its error message with a
direct pointer to the location of the unmet expectation.
2023-05-02 22:11:00 -05:00
71107dda1c lexer: Add readLen and readRunesLen.
Convenience methods for cases where a parser knows it wants to read
multiple bytes or runes from the input stream.
2023-05-02 22:05:00 -05:00
6bbcd9b6a3 lexer: Support multiple nested bookmarks. 2023-04-23 21:56:10 -05:00
68554920e5 Fix bug in parsing TEL content. Rework unit tests.
- newVC3_Tel was not assigning the value provided to the constructed
  object.
- Private unit tests were run every time the code was compiled due to
  how the unittest library works. These now only run as part of the unit
  tests with `nimble test`.
2023-04-16 03:34:14 -05:00
82dffc1154 Initial VCard 3.0 implementation completed. 2023-04-04 14:31:44 -05:00
c322616747 WIP lexer unit tests. 2023-04-01 17:36:01 -05:00
2bc5d5c74f WIP vcard 3.0 lexer and parser. 2023-04-01 16:29:30 -05:00