Skip to content

Commit df9f621

Browse files
committed
refactor(parser): move all remaining AST nodes
This had to happen in a single commit to ensure that circular dependencies were correclty resolved. ## TODO: - Increase converage - Fix poor quality code Issues - Simpligy certain parts of the AST nodes
1 parent f1ce000 commit df9f621

36 files changed

+2427
-2192
lines changed

fortls/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import json
24
import os
35
import pprint
@@ -8,7 +10,7 @@
810
from .interface import cli
911
from .jsonrpc import JSONRPC2Connection, ReadWriter, path_from_uri
1012
from .langserver import LangServer
11-
from .parse_fortran import FortranFile
13+
from .parsers.internal.parser import FortranFile
1214
from .version import __version__
1315

1416
__all__ = ["__version__"]

fortls/langserver.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@
4141
resolve_globs,
4242
set_keyword_ordering,
4343
)
44-
from fortls.intrinsics import (
44+
from fortls.json_templates import change_json, symbol_json, uri_json
45+
from fortls.jsonrpc import JSONRPC2Connection, path_from_uri, path_to_uri
46+
from fortls.parsers.internal.ast import FortranAST
47+
from fortls.parsers.internal.imports import Import
48+
from fortls.parsers.internal.intrinsics import (
4549
Intrinsic,
4650
get_intrinsic_keywords,
4751
load_intrinsics,
4852
set_lowercase_intrinsics,
4953
)
50-
from fortls.json_templates import change_json, symbol_json, uri_json
51-
from fortls.jsonrpc import JSONRPC2Connection, path_from_uri, path_to_uri
52-
from fortls.objects import (
53-
FortranAST,
54-
Import,
55-
Scope,
56-
Use,
57-
Variable,
54+
from fortls.parsers.internal.parser import FortranFile, get_line_context
55+
from fortls.parsers.internal.scope import Scope
56+
from fortls.parsers.internal.use import Use
57+
from fortls.parsers.internal.utilities import (
5858
climb_type_tree,
5959
find_in_scope,
6060
find_in_workspace,
6161
get_use_tree,
6262
)
63-
from fortls.parse_fortran import FortranFile, get_line_context
63+
from fortls.parsers.internal.variable import Variable
6464
from fortls.regex_patterns import create_src_file_exts_str
6565
from fortls.version import __version__
6666

0 commit comments

Comments
 (0)