Compare commits

..

2 Commits

Author SHA1 Message Date
c3239fd1a3 Comments 2026-02-18 21:46:48 -05:00
a09d58b1c7 One-line comment support 2026-02-18 21:43:53 -05:00
2 changed files with 4 additions and 2 deletions

View File

@@ -655,7 +655,8 @@ struct rxcc {
}
func lex(string: String) -> [Substring] {
var line = string.replacing("\n", with: " ")
var line = string.replacing(/\/\/.*\n/, with: "")
line = line.replacing("\n", with: " ")
line = line.replacing("\t", with: " ")
line = line.replacing("{", with: " { ")
line = line.replacing("}", with: " } ")

3
test.c
View File

@@ -1,4 +1,5 @@
int main() {
// Comment
int tomas = 8;
tomas /= 2;
tomas *= 3;
@@ -8,7 +9,7 @@ int main() {
tomas += 31;
tomas &= 21;
tomas |= 3;
tomas |= 303;
tomas |= 303; //hi
tomas ^= 23;
tomas ^= 27;
tomas &= 302;