Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-fplo
Commits
dc44b46f
Commit
dc44b46f
authored
Nov 04, 2016
by
Henning Glawe
Browse files
remove value_str from token class
parent
1b8dd2fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser-fplo/FploInputParser.py
View file @
dc44b46f
...
...
@@ -37,12 +37,11 @@ class token(object):
self
.
match
=
self
.
regex
.
match
(
line
,
pos_in_line
)
if
self
.
match
is
None
:
raise
TokenMatchError
self
.
value_str
=
self
.
match
.
group
(
0
)
self
.
value
=
self
.
match2value
()
def
highlighted
(
self
):
"""return ANSI-highlighted token"""
m
=
self
.
cRE_end_newline
.
match
(
self
.
value_str
)
m
=
self
.
cRE_end_newline
.
match
(
self
.
match
.
group
(
0
)
)
return
self
.
highlight_start
+
m
.
group
(
1
)
+
self
.
highlight_end
+
m
.
group
(
2
)
def
match2value
(
self
):
...
...
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