Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
arpeggio-gm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
郭家华
arpeggio-gm
Commits
62f23dce
Commit
62f23dce
authored
Aug 07, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SemanticActionResults inherits list now
parent
3f9714aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
__init__.py
arpeggio/__init__.py
+3
-13
No files found.
arpeggio/__init__.py
View file @
62f23dce
...
...
@@ -800,7 +800,7 @@ class SemanticAction(object):
return
retval
class
SemanticActionResults
(
objec
t
):
class
SemanticActionResults
(
lis
t
):
"""
Used in first_pass call to supply results of semantic analysis
of children parse tree nodes.
...
...
@@ -810,7 +810,6 @@ class SemanticActionResults(object):
"""
def
__init__
(
self
):
self
.
results
=
{}
self
.
results_list
=
[]
def
append_result
(
self
,
name
,
result
):
if
name
:
...
...
@@ -818,19 +817,10 @@ class SemanticActionResults(object):
self
.
results
[
name
]
=
[]
self
.
results
[
name
]
.
append
(
result
)
self
.
results_list
.
append
(
result
)
def
__getitem__
(
self
,
key
):
return
self
.
results_list
[
key
]
def
__iter__
(
self
):
return
iter
(
self
.
results_list
)
def
__len__
(
self
):
return
len
(
self
.
results_list
)
self
.
append
(
result
)
def
__getattr__
(
self
,
attr_name
):
if
attr_name
in
[
'results'
,
'results_list'
]
:
if
attr_name
==
'results'
:
raise
AttributeError
return
self
.
results
.
get
(
attr_name
,
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment