Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OUTDATED Verse-library
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AutonomyCourse_ECEIllinois
OUTDATED Verse-library
Commits
4063b919
Commit
4063b919
authored
2 years ago
by
li213
Browse files
Options
Downloads
Patches
Plain Diff
fix error while converting enums to strings
parent
b029b4af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
verse/parser/parser.py
+3
-1
3 additions, 1 deletion
verse/parser/parser.py
with
3 additions
and
1 deletion
verse/parser/parser.py
+
3
−
1
View file @
4063b919
...
@@ -600,6 +600,8 @@ def proc(node: ast.AST, env: Env) -> Any:
...
@@ -600,6 +600,8 @@ def proc(node: ast.AST, env: Env) -> Any:
elif
isinstance
(
node
,
ast
.
For
)
or
isinstance
(
node
,
ast
.
While
):
elif
isinstance
(
node
,
ast
.
For
)
or
isinstance
(
node
,
ast
.
While
):
raise
NotImplementedError
(
"
loops not supported
"
)
raise
NotImplementedError
(
"
loops not supported
"
)
elif
isinstance
(
node
,
ast
.
If
):
elif
isinstance
(
node
,
ast
.
If
):
if
astunparser
.
unparse
(
node
)
==
'
\n
if lane_map.has_left(ego.lane_mode):
\n
output.vehicle_mode = VehicleMode.SwitchLeft
\n
'
:
print
(
"
stop
"
)
if
is_main_check
(
node
):
if
is_main_check
(
node
):
return
START_OF_MAIN
return
START_OF_MAIN
test
=
proc
(
node
.
test
,
env
)
test
=
proc
(
node
.
test
,
env
)
...
@@ -624,7 +626,7 @@ def proc(node: ast.AST, env: Env) -> Any:
...
@@ -624,7 +626,7 @@ def proc(node: ast.AST, env: Env) -> Any:
return
env
.
lookup
(
node
.
id
)
return
env
.
lookup
(
node
.
id
)
elif
isinstance
(
node
,
ast
.
Attribute
)
and
isinstance
(
node
.
ctx
,
ast
.
Load
):
elif
isinstance
(
node
,
ast
.
Attribute
)
and
isinstance
(
node
.
ctx
,
ast
.
Load
):
if
isinstance
(
node
.
value
,
ast
.
Name
)
and
node
.
value
.
id
in
env
.
mode_defs
:
if
isinstance
(
node
.
value
,
ast
.
Name
)
and
node
.
value
.
id
in
env
.
mode_defs
:
return
node
.
attr
return
ast
.
Constant
(
node
.
attr
)
obj
=
proc
(
node
.
value
,
env
)
obj
=
proc
(
node
.
value
,
env
)
# TODO since we know what the mode and state types contain we can do some typo checking
# TODO since we know what the mode and state types contain we can do some typo checking
if
not_ir_ast
(
obj
):
if
not_ir_ast
(
obj
):
...
...
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
register
or
sign in
to comment