1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
Commit Graph

14480 Commits

Author SHA1 Message Date
Rob Rix
0d08387684 Rephrase end of input nodes as end of branch. 2017-08-06 18:56:03 -04:00
Rob Rix
d5526db5f9 Colourize the actual position/symbol. 2017-08-06 18:56:03 -04:00
Rob Rix
b40e13a296 Colourize the expected symbols. 2017-08-06 18:56:03 -04:00
Rob Rix
08a6c987c0 Pass the colourize flag to showExpectation & showSymbols. 2017-08-06 18:56:03 -04:00
Rob Rix
2ca0450737 Use the same Colourize type synonym for withSGRCode. 2017-08-06 18:56:03 -04:00
Rob Rix
e74c98f9cc Don’t colourize the whole expectation. 2017-08-06 18:56:03 -04:00
Rob Rix
d9a490381b Freeze the call stacks. 2017-08-06 18:56:03 -04:00
Rob Rix
89e0ef3daf Use the best call stack for uncommitted choices. 2017-08-06 18:56:02 -04:00
Rob Rix
1151fce874 Briefer definition of bestCallStack. 2017-08-06 18:56:02 -04:00
Rob Rix
96d473f8f4 Select a callstack to associate with committed choices. 2017-08-06 18:56:02 -04:00
Rob Rix
9579bc8aaa Spacing. 2017-08-06 18:56:02 -04:00
Rob Rix
fbb217f8e7 Add call stacks to Syntax.Error. 2017-08-06 18:56:02 -04:00
Rob Rix
c516620e24 Add a helper to set an implicit call stack. 2017-08-06 18:56:02 -04:00
Rob Rix
66d03867e1 Avoid re-showing errors in Data.Syntax. 2017-08-06 18:56:02 -04:00
Rob Rix
14001ed70a Avoid re-showing errors in Task. 2017-08-06 18:56:02 -04:00
Rob Rix
b8c1e1a953 Carry callstacks through try. 2017-08-06 18:56:02 -04:00
Rob Rix
caf9535fee Define unexpected by throwing an error with the specified message. 2017-08-06 18:56:02 -04:00
Rob Rix
76edea1341 Labels replace expectations. 2017-08-06 18:56:02 -04:00
Rob Rix
fb6298ba6d Revert "Define a function to compute the expectation for an assignment, which may involve its label."
This reverts commit 1a7e775446b72653570015b08dad0530fe4d9805.
2017-08-06 18:56:02 -04:00
Rob Rix
6036870ea9 Labels participate in committed choice. 2017-08-06 18:56:02 -04:00
Rob Rix
2d7c7fd1ee Define a function to compute the expectation for an assignment, which may involve its label. 2017-08-06 18:56:02 -04:00
Rob Rix
bd4e2666c8 🔥 a redundant Ix constraint on firstSet. 2017-08-06 18:56:02 -04:00
Rob Rix
c1596f942d Assignment errors can be strings. 2017-08-06 18:56:01 -04:00
Rob Rix
8e58a76a01 formatError takes Error String. 2017-08-06 18:56:01 -04:00
Rob Rix
60bafabf17 Move error formatting into Data.Error. 2017-08-06 18:56:01 -04:00
Rob Rix
d18ac5e0c6 Move the Error definition into Data.Error. 2017-08-06 18:56:01 -04:00
Rob Rix
add1d471c9 Stub in a module for Errors. 2017-08-06 18:56:01 -04:00
Rob Rix
55683ea810 Errors carry a full Span. 2017-08-06 18:56:01 -04:00
Rob Rix
261fb37c44 Syntax.Error holds the expected/actual fields. 2017-08-06 18:56:01 -04:00
Rob Rix
880d26078e Rename formatErrorWithOptions to formatError. 2017-08-06 18:56:01 -04:00
Rob Rix
8a7911313a Pass the position, expected, & actual fields to formatErrorWithOptions separately. 2017-08-06 18:56:01 -04:00
Rob Rix
eb1439ebbb showExpectation & showSymbols take Strings. 2017-08-06 18:56:01 -04:00
Rob Rix
b66312567b Define <?> using Label. 2017-08-06 18:56:01 -04:00
Rob Rix
b911f93a58 Define a Label assignment. 2017-08-06 18:56:01 -04:00
Rob Rix
3d9760d5d8 Sort the End case of Show to the top. 2017-08-06 18:56:01 -04:00
Rob Rix
a31e1ce086 Sort the End case to the top. 2017-08-06 18:56:01 -04:00
Rob Rix
3ab717f18f Add a callstack to notFollowedBy. 2017-08-06 18:56:01 -04:00
Rob Rix
99ac5d4486 Define notFollowedBy. 2017-08-06 18:56:01 -04:00
Rob Rix
fcc65d3a3e Allow if statements without elif/else clauses. 2017-08-06 18:56:00 -04:00
Rob Rix
3b5a19c832 Define eof as the End assignment. 2017-08-06 18:56:00 -04:00
Rob Rix
68257e5c3a Add an assignment which only matches at the end of input. 2017-08-06 18:56:00 -04:00
Rob Rix
4e2d29491c Stub in a Parsing instance for Assignment. 2017-08-06 18:53:51 -04:00
Rob Rix
8c9f6ab7fd Assign elif/else blocks correctly. 2017-08-06 18:53:48 -04:00
Rob Rix
6daf3d648b Move the MonadError instance up. 2017-08-06 18:53:44 -04:00
Rob Rix
5dfc165699 Re-export the Parsers module. 2017-08-06 18:53:41 -04:00
Rob Rix
c874c3ac58 Depend on the parsers package. 2017-08-06 18:53:35 -04:00
Rob Rix
302bef15ee 🔥 Data.Amb. 2017-08-06 18:53:29 -04:00
Rob Rix
1ca87c89e8 🔥 a redundant error handler. 2017-08-06 18:53:26 -04:00
Rob Rix
4a4d8ea9c5 🔥 the need for Bounded grammars for Alternative assignments. 2017-08-06 18:53:23 -04:00
Rob Rix
39e30c3d92 empty is Throw Nothing. 2017-08-06 18:53:19 -04:00