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
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
arpeggio-gm
Commits
f6fa97f1
Commit
f6fa97f1
authored
Aug 06, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in NoMatch error reporting from comments parsing.
parent
9360398a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
__init__.py
arpeggio/__init__.py
+10
-7
No files found.
arpeggio/__init__.py
View file @
f6fa97f1
...
@@ -1047,13 +1047,16 @@ class Parser(object):
...
@@ -1047,13 +1047,16 @@ class Parser(object):
Args:
Args:
args: A NoMatch instance or (value, position, parser)
args: A NoMatch instance or (value, position, parser)
"""
"""
if
len
(
args
)
==
1
and
isinstance
(
args
[
0
],
NoMatch
):
# Do not report NoMatch for comments matching.
if
self
.
nm
is
None
or
args
[
0
]
.
position
>
self
.
nm
.
position
:
# Use last exception instead.
self
.
nm
=
args
[
0
]
if
not
self
.
_in_parse_comment
or
self
.
nm
is
None
:
else
:
if
len
(
args
)
==
1
and
isinstance
(
args
[
0
],
NoMatch
):
value
,
position
,
parser
=
args
if
self
.
nm
is
None
or
args
[
0
]
.
position
>
self
.
nm
.
position
:
if
self
.
nm
is
None
or
position
>
self
.
nm
.
position
:
self
.
nm
=
args
[
0
]
self
.
nm
=
NoMatch
(
value
,
position
,
parser
)
else
:
rule
,
position
,
parser
=
args
if
self
.
nm
is
None
or
position
>
self
.
nm
.
position
:
self
.
nm
=
NoMatch
(
rule
,
position
,
parser
)
raise
self
.
nm
raise
self
.
nm
...
...
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