Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
graph_drawing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
graph_drawing
Commits
49a93dc0
Commit
49a93dc0
authored
Sep 13, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup.
parent
8349bc37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
line.py
line.py
+5
-4
No files found.
line.py
View file @
49a93dc0
...
@@ -236,6 +236,7 @@ def generate_line(root):
...
@@ -236,6 +236,7 @@ def generate_line(root):
left
,
right
=
node
left
,
right
=
node
lstr
=
content
[
left
]
lstr
=
content
[
left
]
rstr
=
content
[
right
]
rstr
=
content
[
right
]
lpred
=
pred
(
left
)
lpred
=
pred
(
left
)
rpred
=
pred
(
right
)
rpred
=
pred
(
right
)
lparens
=
rparens
=
False
lparens
=
rparens
=
False
...
@@ -255,16 +256,16 @@ def generate_line(root):
...
@@ -255,16 +256,16 @@ def generate_line(root):
elif
is_left_assoc
(
right
.
title
()):
elif
is_left_assoc
(
right
.
title
()):
rparens
=
True
rparens
=
True
# Check if multiplication sign is necessary
if
op
==
'*'
and
not
unary_right
:
sep
=
mult_sign
(
left
,
right
,
lparens
,
rparens
)
if
lparens
:
if
lparens
:
lstr
=
'('
+
lstr
+
')'
lstr
=
'('
+
lstr
+
')'
if
rparens
:
if
rparens
:
rstr
=
'('
+
rstr
+
')'
rstr
=
'('
+
rstr
+
')'
# Check if multiplication sign is necessary
if
op
==
'*'
and
not
unary_right
:
sep
=
mult_sign
(
left
,
right
,
lparens
,
rparens
)
return
lstr
+
sep
+
rstr
return
lstr
+
sep
+
rstr
def
construct_nary_mult
(
node
):
def
construct_nary_mult
(
node
):
...
...
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