summaryrefslogtreecommitdiff
path: root/examples/matchPreviousDemo.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-12-22 09:28:48 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2018-12-22 13:46:56 -0800
commitde8326d00dffdb500c02839a98330b869c2457f3 (patch)
tree6c5fdae41cf8b335ff1c64f37856786523e4fd0d /examples/matchPreviousDemo.py
parent59dfd314c23fd653271bdad37631f0497e8ad748 (diff)
downloadpyparsing-git-de8326d00dffdb500c02839a98330b869c2457f3.tar.gz
Trim trailing white space throughout the project
Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines.
Diffstat (limited to 'examples/matchPreviousDemo.py')
-rw-r--r--examples/matchPreviousDemo.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/matchPreviousDemo.py b/examples/matchPreviousDemo.py
index f0812e9..34991f8 100644
--- a/examples/matchPreviousDemo.py
+++ b/examples/matchPreviousDemo.py
@@ -8,11 +8,11 @@ src = """
class a
...
end a;
-
+
class b
...
end b;
-
+
class c
...
end d;"""
@@ -20,7 +20,7 @@ end d;"""
identifier = Word(alphas)
-classIdent = identifier("classname") # note that this also makes a copy of identifier
+classIdent = identifier("classname") # note that this also makes a copy of identifier
classHead = "class" + classIdent
classBody = "..."
classEnd = "end" + matchPreviousLiteral(classIdent) + ';'
@@ -30,4 +30,4 @@ classDefn = classHead + classBody + classEnd
# classDefn = classHead + classBody - classEnd
for tokens in classDefn.searchString(src):
- print(tokens.classname) \ No newline at end of file
+ print(tokens.classname)