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

12013 Commits

Author SHA1 Message Date
Rob Rix
1893d61eda Assign a += b assignments as a = a + b. 2017-05-03 10:37:29 -04:00
Rob Rix
080f30c704 Test that withTokens preserves anonymous nodes. 2017-05-03 10:13:40 -04:00
Rob Rix
33cdb49619 Define a combinator to assign without dropping token nodes. 2017-05-03 10:13:23 -04:00
Rob Rix
ad642922ec Test that anonymous nodes are not dropped after matching. 2017-05-03 10:09:31 -04:00
Rob Rix
80c3072508 Test that anonymous nodes are dropped at the start of input. 2017-05-03 10:07:53 -04:00
Rob Rix
ab1e7ac9e0 Give a list of symbol types to consider. 2017-05-03 10:03:02 -04:00
Rob Rix
7e0f13fc63 Bind the initial state to clarify the intent of the test. 2017-05-03 09:42:57 -04:00
Rob Rix
7ae74cdacc Use makeState to tidy up an expectation. 2017-05-03 09:42:18 -04:00
Rob Rix
72de8792c4 Construct Source with OverloadedStrings. 2017-05-03 09:40:52 -04:00
Rob Rix
1c968e3aab Use makeState in the assignment spec. 2017-05-03 09:39:24 -04:00
Rob Rix
bfd55c49c9 Correct a test. 2017-05-03 09:39:19 -04:00
Rob Rix
3ff041adcd Define a helper to construct starting states. 2017-05-03 09:36:35 -04:00
Rob Rix
ae9fc6ea4f Add a section header for the instances. 2017-05-03 09:35:51 -04:00
Rob Rix
14c12b3582 📝s. 2017-05-02 15:21:29 -04:00
Rob Rix
8a506e5efa Define a convenience for parsing straight to a term, logging errors. 2017-05-02 14:55:05 -04:00
Rob Rix
496c009379 Don’t pass the source through. 2017-05-02 14:53:07 -04:00
Rob Rix
73d1b83737 Rename assignAll to assign, taking a single root node. 2017-05-02 12:07:24 -04:00
Rob Rix
dd2ee0a669 Use the leaf helper to assign symbols. 2017-05-02 11:33:51 -04:00
Rob Rix
137b26d203 Define addition expression syntax. 2017-05-02 11:31:37 -04:00
Rob Rix
2246580687 Define assignment syntax. 2017-05-02 11:26:02 -04:00
Rob Rix
492b8e895e 🔥 redundant parens. 2017-05-02 11:25:48 -04:00
Rob Rix
40b0ff3a7b Derive an IsString instance for Source. 2017-05-02 09:37:02 -04:00
Rob Rix
5ddd0995d0 Sort imports. 2017-05-02 09:35:42 -04:00
Rob Rix
0b96eb7c0f Assign symbol literals. 2017-05-01 17:22:35 -04:00
Rob Rix
d025774908 Rename the SymbolLiteral constructor to Symbol. 2017-05-01 17:20:36 -04:00
Rob Rix
19c0abc218 Move the control flow modifiers into the normal variations. 2017-05-01 17:15:25 -04:00
Rob Rix
0519f658ea Note some more literals. 2017-05-01 17:07:51 -04:00
Rob Rix
366a77ade4 Note a potential direction for numeric literals. 2017-05-01 17:06:38 -04:00
Rob Rix
ea2ccec784 Note that we don’t differentiate between line/block comments yet. 2017-05-01 16:59:04 -04:00
Rob Rix
051e87a3b2 Note that redo/retry aren’t yet handled. 2017-05-01 16:54:30 -04:00
Rob Rix
5881bae111 Note that we don’t discriminate between .. and ... yet. 2017-05-01 16:50:41 -04:00
Rob Rix
87f779af46 Assign range literals. 2017-05-01 16:50:00 -04:00
Rob Rix
202f31fa96 Assign for each bindings as identifiers. 2017-05-01 16:47:11 -04:00
Rob Rix
ae56675e3b Assign for statements. 2017-05-01 16:44:52 -04:00
Rob Rix
20109d2705 Assign until modifiers. 2017-05-01 16:38:35 -04:00
Rob Rix
8aad196202 Assign until statements. 2017-05-01 16:37:13 -04:00
Rob Rix
5ab78c37b9 Assign while modifiers. 2017-05-01 15:59:08 -04:00
Rob Rix
173c0ecef6 Assign while statements. 2017-05-01 15:57:09 -04:00
Rob Rix
90b07663ed Avoid producing extra errors when we have one already. 2017-05-01 15:53:00 -04:00
Rob Rix
b1ef673d86 Errors point at the start of the current node where possible. 2017-05-01 11:21:07 -04:00
Rob Rix
f709375805 Unpack the actual symbol explicitly. 2017-05-01 11:19:30 -04:00
Rob Rix
50758e0f7e Number the lines in the error message output. 2017-05-01 11:16:08 -04:00
Rob Rix
1dabf3c9d3 Show up to three lines of context. 2017-05-01 11:04:49 -04:00
Rob Rix
91e9e59488 📝 showError. 2017-05-01 10:52:59 -04:00
Rob Rix
c0dd99a5a4 Pull the context into the where clause. 2017-05-01 10:52:29 -04:00
Rob Rix
e33da12d1b Show the source of the error with a clang-style error message. 2017-05-01 10:51:12 -04:00
Rob Rix
434adf3eca Show the expectation with a helper. 2017-05-01 10:33:21 -04:00
Rob Rix
5662b9cead Define a function to show an Error. 2017-05-01 10:32:25 -04:00
Rob Rix
9593416367 Define a helper to show a comma-separated list of symbols.
Complications due to the Oxford comma.
2017-05-01 10:32:07 -04:00
Rob Rix
c1ac705f54 Define a helper to show a SourcePos. 2017-05-01 10:31:46 -04:00