| 1 |
# common.py |
| 2 |
# |
| 3 |
# Copyright 2022 James Westman <[email protected]> |
| 4 |
# |
| 5 |
# This file is free software; you can redistribute it and/or modify it |
| 6 |
# under the terms of the GNU Lesser General Public License as |
| 7 |
# published by the Free Software Foundation; either version 3 of the |
| 8 |
# License, or (at your option) any later version. |
| 9 |
# |
| 10 |
# This file is distributed in the hope that it will be useful, but |
| 11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
# Lesser General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU Lesser General Public |
| 16 |
# License along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
# |
| 18 |
# SPDX-License-Identifier: LGPL-3.0-or-later |
| 19 |
|
| 20 |
|
| 21 |
from .. import decompiler as decompile |
| 22 |
from .. import gir |
| 23 |
from ..ast_utils import AstNode, autofix, context, docs, validate |
| 24 |
from ..completions_utils import * |
| 25 |
from ..decompiler import ( |
| 26 |
DecompileCtx, |
| 27 |
decompile_translatable, |
| 28 |
decompiler, |
| 29 |
escape_quote, |
| 30 |
truthy, |
| 31 |
) |
| 32 |
from ..errors import ( |
| 33 |
CodeAction, |
| 34 |
CompileError, |
| 35 |
CompileWarning, |
| 36 |
DeprecatedWarning, |
| 37 |
MultipleErrors, |
| 38 |
UnusedWarning, |
| 39 |
UpgradeWarning, |
| 40 |
) |
| 41 |
from ..gir import ( |
| 42 |
BoolType, |
| 43 |
Enumeration, |
| 44 |
ExternType, |
| 45 |
FloatType, |
| 46 |
GirType, |
| 47 |
IntType, |
| 48 |
StringType, |
| 49 |
) |
| 50 |
from ..lsp_utils import ( |
| 51 |
Completion, |
| 52 |
CompletionItemKind, |
| 53 |
DocumentSymbol, |
| 54 |
LocationLink, |
| 55 |
SemanticToken, |
| 56 |
SemanticTokenType, |
| 57 |
SymbolKind, |
| 58 |
get_docs_section, |
| 59 |
) |
| 60 |
from ..parse_tree import * |
| 61 |
|
| 62 |
OBJECT_CONTENT_HOOKS = AnyOf() |
| 63 |
LITERAL = AnyOf() |