One-line comment support
This commit is contained in:
@@ -655,7 +655,8 @@ struct rxcc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func lex(string: String) -> [Substring] {
|
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("\t", with: " ")
|
||||||
line = line.replacing("{", with: " { ")
|
line = line.replacing("{", with: " { ")
|
||||||
line = line.replacing("}", with: " } ")
|
line = line.replacing("}", with: " } ")
|
||||||
|
|||||||
3
test.c
3
test.c
@@ -1,4 +1,5 @@
|
|||||||
int main() {
|
int main() {
|
||||||
|
// Comment
|
||||||
int tomas = 8;
|
int tomas = 8;
|
||||||
tomas /= 2;
|
tomas /= 2;
|
||||||
tomas *= 3;
|
tomas *= 3;
|
||||||
@@ -8,7 +9,7 @@ int main() {
|
|||||||
tomas += 31;
|
tomas += 31;
|
||||||
tomas &= 21;
|
tomas &= 21;
|
||||||
tomas |= 3;
|
tomas |= 3;
|
||||||
tomas |= 303;
|
tomas |= 303; //hi
|
||||||
tomas ^= 23;
|
tomas ^= 23;
|
||||||
tomas ^= 27;
|
tomas ^= 27;
|
||||||
tomas &= 302;
|
tomas &= 302;
|
||||||
|
|||||||
Reference in New Issue
Block a user