summaryrefslogtreecommitdiff
path: root/testsuite.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-09-29 16:27:21 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-09-29 18:08:52 +0200
commitc1dcaa3ccbb263f021157f2aebd185c6388c28a1 (patch)
treed7427aa83999dbcbbc21e9d305defda4295fba32 /testsuite.py
parent3673ffb8fbd283948821601a0d9b6ec724984474 (diff)
Refactor parsing to get rid of _saved_line
Handle the line-after-help-text case specially, which allows _has_tokens (renamed to _reuse_tokens) to be used as the unget mechanism for help texts as well, leaving _saved_line unused. Move the _reuse_tokens check into _next_line(). This makes _parse_block() as straightforward as _parse_properties(), and simplifies _parse_properties() a tiny bit too by getting rid of the '_tokens_i = -1' assignment.
Diffstat (limited to 'testsuite.py')
-rw-r--r--testsuite.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuite.py b/testsuite.py
index 802234e..c027189 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -1014,6 +1014,7 @@ g
verify_locations(c.syms["MULTI_DEF"].nodes,
"tests/Klocation:7",
"tests/Klocation:37",
+ "tests/Klocation:39",
"tests/Klocation_sourced:3",
"tests/sub/Klocation_rsourced:2",
"tests/sub/Klocation_gsourced1:1",
@@ -1024,7 +1025,7 @@ g
"tests/sub/Klocation_grsourced2:1",
"tests/sub/Klocation_grsourced1:1",
"tests/sub/Klocation_grsourced2:1",
- "tests/Klocation:70")
+ "tests/Klocation:72")
verify_locations(c.named_choices["CHOICE"].nodes,
"tests/Klocation_sourced:5")
@@ -1103,7 +1104,8 @@ tests/Krecursive2:1
[node.item.name for node in c.node_iter()
if isinstance(node.item, Symbol)],
["SINGLE_DEF", "MULTI_DEF", "HELP_1", "HELP_2", "HELP_3", "MULTI_DEF",
- "MULTI_DEF", "MENU_HOOK", "COMMENT_HOOK"] + 10*["MULTI_DEF"])
+ "MULTI_DEF", "MULTI_DEF", "MENU_HOOK", "COMMENT_HOOK"] + \
+ 10*["MULTI_DEF"])
verify_equal(
[node.item.name for node in c.node_iter(True)