Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-oceandsls
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oceandsl
python-oceandsls
Commits
b4df5fd6
Commit
b4df5fd6
authored
Oct 24, 2023
by
Sven Gundlach
Browse files
Options
Downloads
Patches
Plain Diff
clean code
parent
fea1f50a
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!29
clean code server.py and suggest_variables.py
,
!28
clean code server.py and suggest_variables.py
,
!27
Tdd index calc
Pipeline
#13956
passed
Oct 24, 2023
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tdd-dsl/tddlspserver/utils/compute_token_index.py
+0
-13
0 additions, 13 deletions
tdd-dsl/tddlspserver/utils/compute_token_index.py
with
0 additions
and
13 deletions
tdd-dsl/tddlspserver/utils/compute_token_index.py
+
0
−
13
View file @
b4df5fd6
...
...
@@ -82,8 +82,6 @@ def position_of_token(
if
token
.
type
in
identifier_token_types
:
index
-=
1
# TODO check to choose complete token text or substring
# result: TokenPosition = tokenPosition(index, parseTree, text)
text
=
text
[
0
:
caret_position
.
column
-
start
]
if
not
isinstance
(
parser_rule_context
,
ErrorNodeImpl
)
else
""
result
:
TokenPosition
=
TokenPosition
(
index
,
parser_rule_context
,
text
)
...
...
@@ -103,17 +101,6 @@ def compute_token_position_of_terminal(
def
compute_token_position_of_child_node
(
parser_rule_context
:
ParserRuleContext
,
tokens
:
BufferedTokenStream
,
caret_position
:
CaretPosition
,
identifier_token_types
:
List
[
int
]
):
# Return None if no token exists or caret is outside of token lines
# start_line: Optional[int] = None
# end_line: Optional[int] = None
# if tokens and tokens.tokens:
# first_token: CommonToken = tokens.tokens[0]
# last_token: CommonToken = tokens.tokens[-1]
# start_line = first_token.line
# end_line = last_token.line
# if (start_line and start_line > caret_position.line) or (end_line and end_line < caret_position.line):
# return None
# Return None if no context exists or caret is outside of context
start_line
:
Optional
[
int
]
=
None
end_line
:
Optional
[
int
]
=
None
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment