16 Commits

Author SHA1 Message Date
Joao Paulo Magalhaes
e08f69fcf6 refactor error API: update tests 2025-12-28 19:17:22 +00:00
Joao Paulo Magalhaes
44ef17ae66 parser: move tree-aware location functions to Tree/Node 2025-09-28 18:45:41 +01:00
Joao Paulo Magalhaes
38f616b7bd rename ExpectError::do_check() to ExpectError::check_error() 2024-08-12 18:38:20 +01:00
Joao Paulo Magalhaes
ad7568f4d2 event-based parser policy pt2: tests 2024-05-05 18:51:08 +02:00
Joao Paulo Magalhaes
ce4b930ac9 [fix] improve edge case of doc locations 2022-10-05 18:02:36 +01:00
Joao Paulo Magalhaes
744e906e2c [fix] locations: try hard to not yield to the beginning of the buffer 2022-09-28 20:39:22 +01:00
Adrian Ebeling
e7c0b24832 Store null values as str==nullptr
Re #263

To differentiate between "null" zero-length scalars, these are now stored in
different ways:
- null values are stored with str == nullptr. Unfortunately we lose the
  location information for these.
- zero-length strings are stored with (str != nullptr), either their location
  in the source buffer or the arena.
  If the arena is empty (nullptr) and a zero-length scalar is stored, some
  space is reserved for this string to have a non-nullptr str for this scalar.
  (However, the reserved space will not actually be used up by the scalar.)
2022-09-28 19:11:38 +01:00
Joao Paulo Magalhaes
cecc60465d [fix breaking] locations are now opt-in when creating the parser
re #260
2022-09-27 09:36:49 +01:00
Joao Paulo Magalhaes
e2e541cbe9 [test] add unit tests demonstrating the problem
re #260
2022-09-26 16:35:05 +01:00
Joao Paulo Magalhaes
3b6e391aee [refac] NodeRef: use the const methods from the CRTP 2022-08-14 12:06:42 +01:00
Joao Paulo Magalhaes
95f9fb5290 [fix] location: improve corner cases 2022-01-17 00:43:49 +00:00
Joao Paulo Magalhaes
8161addedb [refac] remove the parser options: lazily cache the location accelerator 2022-01-06 00:38:26 +00:00
Joao Paulo Magalhaes
e02ddac54d [impl] reinstate old parse(), but mark deprecated 2022-01-05 17:22:15 +00:00
Joao Paulo Magalhaes
4d042274dc [impl] improve location of containers 2022-01-05 17:22:15 +00:00
Joao Paulo Magalhaes
b4a603911b [breaking] rename parse() to either parse_in_place() or parse_in_arena() 2022-01-04 15:33:09 +00:00
Joao Paulo Magalhaes
add84f70d3 [wip] adding locations 2022-01-04 03:53:00 +00:00