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
3f701132
Commit
3f701132
authored
Sep 10, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in exception handling for in-comment NoMatches.
parent
60abc657
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
__init__.py
arpeggio/__init__.py
+10
-2
No files found.
arpeggio/__init__.py
View file @
3f701132
...
...
@@ -1220,15 +1220,23 @@ class Parser(object):
# Do not report NoMatch for comments matching.
# Use last exception instead.
if
not
self
.
_in_parse_comment
or
self
.
nm
is
None
:
# Non-comment nm will override comment nm
if
self
.
nm
is
not
None
:
override
=
self
.
nm
.
_in_comment
and
not
self
.
_in_parse_comment
else
:
override
=
True
if
len
(
args
)
==
1
and
isinstance
(
args
[
0
],
NoMatch
):
# Do not report soft failures
if
not
args
[
0
]
.
soft
:
if
self
.
nm
is
Non
e
or
args
[
0
]
.
position
>
self
.
nm
.
position
:
if
overrid
e
or
args
[
0
]
.
position
>
self
.
nm
.
position
:
self
.
nm
=
args
[
0
]
self
.
nm
.
_in_comment
=
self
.
_in_parse_comment
else
:
rule
,
position
,
parser
=
args
if
self
.
nm
is
Non
e
or
position
>
self
.
nm
.
position
:
if
overrid
e
or
position
>
self
.
nm
.
position
:
self
.
nm
=
NoMatch
(
rule
,
position
,
parser
)
self
.
nm
.
_in_comment
=
self
.
_in_parse_comment
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