mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
lsp: Add document outline
This commit is contained in:
parent
950b141d26
commit
e087aeb44f
24 changed files with 469 additions and 28 deletions
|
@ -30,7 +30,8 @@ def parse(
|
|||
"""Parses a list of tokens into an abstract syntax tree."""
|
||||
|
||||
try:
|
||||
ctx = ParseContext(tokens)
|
||||
original_text = tokens[0].string if len(tokens) else ""
|
||||
ctx = ParseContext(tokens, original_text)
|
||||
AnyOf(UI).parse(ctx)
|
||||
ast_node = ctx.last_group.to_ast() if ctx.last_group else None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue