mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add lambda expressions
This commit is contained in:
parent
012bdf6843
commit
fc497ac9e6
18 changed files with 247 additions and 80 deletions
|
@ -17,7 +17,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
|
||||
from .. import gir
|
||||
from ..ast_utils import AstNode, validate, docs
|
||||
from ..errors import CompileError, MultipleErrors
|
||||
|
@ -27,10 +26,29 @@ from ..decompiler import DecompileCtx, decompiler
|
|||
from ..gir import StringType, BoolType, IntType, FloatType, GirType, Enumeration
|
||||
from ..lsp_utils import Completion, CompletionItemKind, SemanticToken, SemanticTokenType
|
||||
from ..parse_tree import *
|
||||
from ..parser_utils import *
|
||||
from ..xml_emitter import XmlEmitter
|
||||
|
||||
|
||||
OBJECT_HOOKS = AnyOf()
|
||||
OBJECT_CONTENT_HOOKS = AnyOf()
|
||||
VALUE_HOOKS = AnyOf()
|
||||
|
||||
|
||||
class Scope:
|
||||
def get_variables(self) -> T.Iterator[str]:
|
||||
yield from self.get_objects().keys()
|
||||
|
||||
def get_objects(self) -> T.Dict[str, T.Any]:
|
||||
raise NotImplementedError()
|
||||
|
||||
@property
|
||||
def this_name(self) -> T.Optional[str]:
|
||||
return None
|
||||
|
||||
@property
|
||||
def this_type(self) -> T.Optional[str]:
|
||||
return None
|
||||
|
||||
@property
|
||||
def this_type_glib_name(self) -> T.Optional[str]:
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue