Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented lexical and visual distinction for differently based numbers
Added lexing, parsing and highlighting Fixes #2225
- Loading branch information
Showing
25 changed files
with
179 additions
and
39 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
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
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
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
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
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
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,10 @@ | ||
12345; | ||
12345.67; | ||
.23E-10; # a very small number | ||
3.14_15_92; # a very important number | ||
4_294_967_296; # underscore for legibility | ||
0xff; # hex | ||
0xdead_beef; # more hex | ||
0377; # octal (only numbers, begins with 0) | ||
0b011011; # binary | ||
# 0x1.999ap-4 # hexadecimal floating point (the 'p' is required) |
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,52 @@ | ||
12345 | ||
PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
12345.67 | ||
PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
.23E-10 | ||
PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# a very small number | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
3.14_15_92 | ||
PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# a very important number | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
4_294_967_296 | ||
PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# underscore for legibility | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
0xff | ||
PERL_NUMBER_HEX => PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# hex | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
0xdead_beef | ||
PERL_NUMBER_HEX => PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# more hex | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
0377 | ||
PERL_NUMBER_OCT => PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# octal (only numbers, begins with 0) | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
0b011011 | ||
PERL_NUMBER_BIN => PERL_NUMBER => DEFAULT_NUMBER | ||
; | ||
PERL_SEMICOLON => DEFAULT_SEMICOLON | ||
# binary | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT | ||
# 0x1.999ap-4 # hexadecimal floating point (the 'p' is required) | ||
PERL_COMMENT => DEFAULT_LINE_COMMENT |
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
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
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
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
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
Oops, something went wrong.