Skip to content

Ghidra is a software reverse engineering (SRE) framework

Merge remote-tracking branch 'origin/patch'

Ryan Kurtz902c5f72b85b
diff --cc Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/ClangToken.java
index d2b0d5fe63,042ae6392c..dddf6d3f57
--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/ClangToken.java
+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/ClangToken.java
@@@ -324,12 -321,13 +325,22 @@@ public class ClangToken implements Clan
return null;
}
+ /**
+ * If the token represents an underlying integer constant, return the constant as a Scalar.
+ * Otherwise return null.
+ * @return the Scalar that the token represents or null
+ */
+ public Scalar getScalar() {
+ return null;
+ }
++
+ /**
+ * Get an iterator over tokens starting with this ClangToken. Tokens are returned in normal
+ * display order (forward=true) or in the reverse of normal display order (forward=false)
+ * @param forward is true for forward iterator, false for a backward iterator
+ * @return the Iterator object
+ */
+ public Iterator<ClangToken> iterator(boolean forward) {
+ return new TokenIterator(this, forward);
+ }
}