
org.snapscript.parse.SyntaxNodeComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap Show documentation
Show all versions of snap Show documentation
Dynamic scripting for the JVM
The newest version!
package org.snapscript.parse;
import java.util.Comparator;
public class SyntaxNodeComparator implements Comparator {
public SyntaxNodeComparator() {
super();
}
@Override
public int compare(SyntaxNode left, SyntaxNode right) {
int leftMark = left.getStart();
int rightMark = right.getStart();
if(leftMark < rightMark) {
return -1;
}
if(leftMark == rightMark) {
return 0;
}
return 1;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy