Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed @<column> requirement implementation #2069

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module lang::rascal::tests::concrete::AtColumnRequirement

import ParseTree;
import Exception;

lexical C = C C C | "a"@2 | "b";

test bool testA() {
try {
parse(#C, "a");
} catch ParseError(e): {
PieterOlivier marked this conversation as resolved.
Show resolved Hide resolved
return true;
}

return false;
}

test bool testBab() {
try {
parse(#C, "bab");
} catch ParseError(e): {
return true;
}

return false;
}

test bool testBba() {
try {
parse(#C, "bba");
} catch ParseError(e): {
return false;
}

return true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public AtColumnRequirement(int column){
}

public boolean isFiltered(int[] input, int start, PositionStore positionStore){
return positionStore.isAtColumn(start, column);
return !positionStore.isAtColumn(start, column);
}

public boolean isEqual(IEnterFilter otherEnterFilter){
Expand Down
Loading