Commit e0c8aec
Sebastian Kaupper
Add parsing of context reference blocks together with context declarations
Add functions to the TokenToBlockParser which can be generally useful:
HandleNonCodeTokens creates NonCode (i.e. whitespace and comment)
blocks. The LRM allows these blocks basically everywhere.
Note: Delimited comments are strictly speaking not separators
according to the LRM (§15.3)!
ReparseFromTokenMarker allows to iterate over a set of tokens a second
time. This is useful if you cannot decide the block type based on a
single token. `Context.StartBlock` searches ahead (without modifying
tokens or adding blocks) until it can decide whether the `context`
keyword is used in a context declaration or a context reference.
Additionally, some changes are made to satisfy the static type checker.1 parent d762084 commit e0c8aec
6 files changed
Lines changed: 827 additions & 224 deletions
File tree
- pyVHDLParser/Blocks
- Reference
- tests/unit
- SimpleBlockSequences
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
0 commit comments