diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2024-06-21 06:13:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-21 14:13:09 +0100 |
| commit | e5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4 (patch) | |
| tree | 9b6ecc7ef37b1ec7f08efed6f908f478dc551e03 /chapter01/src/main/java/com | |
| parent | a749c244bea3e2774d453165cbd18ed52863a8f5 (diff) | |
| download | Simple-e5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4.tar.gz Simple-e5f4f7b85fbb91a293a7d89d7b85adfbaeeb51f4.zip | |
Format whitespace (#86)
* Trim trailing whitespace
* Ensure final new lines
* Convert line endings from CRLF to LF
* Replace tabs with spaces
Diffstat (limited to 'chapter01/src/main/java/com')
3 files changed, 5 insertions, 5 deletions
diff --git a/chapter01/src/main/java/com/seaofnodes/simple/Parser.java b/chapter01/src/main/java/com/seaofnodes/simple/Parser.java index e2c1ca71..d79d23ff 100644 --- a/chapter01/src/main/java/com/seaofnodes/simple/Parser.java +++ b/chapter01/src/main/java/com/seaofnodes/simple/Parser.java @@ -194,7 +194,7 @@ public class Parser { return Long.parseLong(snum); } - // First letter of an identifier + // First letter of an identifier private boolean isIdStart(char ch) { return Character.isAlphabetic(ch) || ch == '_'; } @@ -210,7 +210,7 @@ public class Parser { return new String(_input, start, --_position - start); } - // + // private boolean isPunctuation(char ch) { return "=;[]<>()+-/*".indexOf(ch) != -1; } diff --git a/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java b/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java index cf465e94..5d74e206 100644 --- a/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java +++ b/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java @@ -52,7 +52,7 @@ public abstract class Node { if( n != null ) n._outputs.add( this ); } - + /** * Gets the ith input node * @param i Offset of the input node @@ -67,7 +67,7 @@ public abstract class Node { public boolean isUnused() { return nOuts() == 0; } public boolean isCFG() { return false; } - + /** * Used to allow repeating tests in the same JVM. This just resets the diff --git a/chapter01/src/main/java/com/seaofnodes/simple/node/ReturnNode.java b/chapter01/src/main/java/com/seaofnodes/simple/node/ReturnNode.java index 5e083cf2..85bbc83f 100644 --- a/chapter01/src/main/java/com/seaofnodes/simple/node/ReturnNode.java +++ b/chapter01/src/main/java/com/seaofnodes/simple/node/ReturnNode.java @@ -19,5 +19,5 @@ public class ReturnNode extends Node { public Node expr() { return in(1); } @Override public boolean isCFG() { return true; } - + } |
