-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Birb: Fixed class name false positives (#3111)
- Loading branch information
1 parent
2f7f736
commit d7017be
Showing
5 changed files
with
108 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
class Birb { | ||
String name = "Birb"; | ||
int age = 5; | ||
bool isMale = true; | ||
|
||
String getName() { | ||
return name; | ||
} | ||
} | ||
|
||
List list = ["Seeb", 10, false]; | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "class"], | ||
["class-name", "Birb"], | ||
["punctuation", "{"], | ||
|
||
["class-name", "String"], | ||
["variable", "name"], | ||
["operator", "="], | ||
["string", "\"Birb\""], | ||
["punctuation", ";"], | ||
|
||
["class-name", "int"], | ||
["variable", "age"], | ||
["operator", "="], | ||
["number", "5"], | ||
["punctuation", ";"], | ||
|
||
["class-name", "bool"], | ||
["variable", "isMale"], | ||
["operator", "="], | ||
["boolean", "true"], | ||
["punctuation", ";"], | ||
|
||
["class-name", "String"], | ||
["function", "getName"], | ||
["punctuation", "("], | ||
["punctuation", ")"], | ||
["punctuation", "{"], | ||
|
||
["class-name", "return"], | ||
["variable", "name"], | ||
["punctuation", ";"], | ||
|
||
["punctuation", "}"], | ||
|
||
["punctuation", "}"], | ||
|
||
["class-name", "List"], | ||
["variable", "list"], | ||
["operator", "="], | ||
["punctuation", "["], | ||
["string", "\"Seeb\""], | ||
["punctuation", ","], | ||
["number", "10"], | ||
["punctuation", ","], | ||
["boolean", "false"], | ||
["punctuation", "]"], | ||
["punctuation", ";"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,57 @@ | ||
assert break case | ||
assert; | ||
break; | ||
case; | ||
class; | ||
const default | ||
else enum | ||
final | ||
const; | ||
default; | ||
else; | ||
enum; | ||
final; | ||
follows; | ||
for grab | ||
if nest | ||
for; | ||
grab; | ||
if; | ||
nest; | ||
next; | ||
new; | ||
noSeeb return | ||
static switch | ||
throw var | ||
void while | ||
noSeeb; | ||
return; | ||
static; | ||
switch; | ||
throw; | ||
var; | ||
void; | ||
while; | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "assert"], ["keyword", "break"], ["keyword", "case"], | ||
["keyword", "assert"], ["punctuation", ";"], | ||
["keyword", "break"], ["punctuation", ";"], | ||
["keyword", "case"], ["punctuation", ";"], | ||
["keyword", "class"], ["punctuation", ";"], | ||
["keyword", "const"], ["keyword", "default"], | ||
["keyword", "else"], ["keyword", "enum"], | ||
["keyword", "final"], | ||
["keyword", "const"], ["punctuation", ";"], | ||
["keyword", "default"], ["punctuation", ";"], | ||
["keyword", "else"], ["punctuation", ";"], | ||
["keyword", "enum"], ["punctuation", ";"], | ||
["keyword", "final"], ["punctuation", ";"], | ||
["keyword", "follows"], ["punctuation", ";"], | ||
["keyword", "for"], ["keyword", "grab"], | ||
["keyword", "if"], ["keyword", "nest"], | ||
["keyword", "for"], ["punctuation", ";"], | ||
["keyword", "grab"], ["punctuation", ";"], | ||
["keyword", "if"], ["punctuation", ";"], | ||
["keyword", "nest"], ["punctuation", ";"], | ||
["keyword", "next"], ["punctuation", ";"], | ||
["keyword", "new"], ["punctuation", ";"], | ||
["keyword", "noSeeb"], ["keyword", "return"], | ||
["keyword", "static"], ["keyword", "switch"], | ||
["keyword", "throw"], ["keyword", "var"], | ||
["keyword", "void"], ["keyword", "while"] | ||
["keyword", "noSeeb"], ["punctuation", ";"], | ||
["keyword", "return"], ["punctuation", ";"], | ||
["keyword", "static"], ["punctuation", ";"], | ||
["keyword", "switch"], ["punctuation", ";"], | ||
["keyword", "throw"], ["punctuation", ";"], | ||
["keyword", "var"], ["punctuation", ";"], | ||
["keyword", "void"], ["punctuation", ";"], | ||
["keyword", "while"], ["punctuation", ";"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for all keywords. | ||
Checks for all keywords. |