Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
snakes
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2014-03-26 12:47:23 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ed09ceb32691950715553172ddc45a70a2cf38a
6ed09ceb
1 parent
9861bddf
fixed missing ABCD st in ast
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
snakes/lang/abcd/parser.py
snakes/utils/abcd/html.py
snakes/lang/abcd/parser.py
View file @
6ed09ce
...
...
@@ -160,9 +160,13 @@ class Translator (PyTranslator) :
while
len
(
nodes
)
>
1
:
left
=
nodes
.
pop
(
0
)
right
=
nodes
.
pop
(
0
)
nodes
.
insert
(
0
,
self
.
ST
.
AbcdFlowOp
(
lineno
=
left
.
lineno
,
col_offset
=
left
.
col_offset
,
left
=
left
,
op
=
op
(),
right
=
right
))
theop
=
op
()
theop
.
st
=
st
[
1
]
flow
=
self
.
ST
.
AbcdFlowOp
(
lineno
=
left
.
lineno
,
col_offset
=
left
.
col_offset
,
left
=
left
,
op
=
theop
,
right
=
right
)
flow
.
st
=
st
nodes
.
insert
(
0
,
flow
)
return
nodes
[
0
]
def
do_abcd_expr
(
self
,
st
,
ctx
)
:
"""abcd_expr: abcd_choice_expr ('|' abcd_choice_expr)*
...
...
snakes/utils/abcd/html.py
View file @
6ed09ce
...
...
@@ -252,7 +252,8 @@ class ABCD2HTML (ast.NodeVisitor) :
t
=
t
[
0
]
while
t
[
0
]
.
text
==
'('
:
t
=
t
[
1
]
self
.
setspan
(
"flow"
,
t
[
1
])
for
op
in
t
[
1
::
2
]
:
self
.
setspan
(
"flow"
,
op
)
self
.
generic_visit
(
node
)
def
visit_SimpleAccess
(
self
,
node
)
:
self
.
setspan
(
"name"
,
node
.
st
[
0
])
...
...
Please
register
or
login
to post a comment