-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1221 from andrew-johnson-4/c-ansi-frontend-cejpof
C ansi frontend cejpof
- Loading branch information
Showing
14 changed files
with
138 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
|
||
import SRC/plugins-frontends.lsts; | ||
import SRC/plugins-backends.lsts; | ||
|
||
# orphans | ||
import SRC/typeof-var.lsts; | ||
import SRC/bind-varargs.lsts; |
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,8 @@ | ||
|
||
import SRC/typeof-var.lsts; | ||
import SRC/bind-varargs.lsts; | ||
import SRC/index-types.lm; | ||
import PLUGINS/FRONTEND/LM/index-index.lm; | ||
import SRC/index-plugins.lm; | ||
import SRC/index-tokenize.lm; | ||
import SRC/substitute.lsts; |
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,72 @@ | ||
|
||
import LIB/default.lsts; | ||
import SRC/unit-ast.lsts; | ||
import SRC/unit-drivers.lsts; | ||
import SRC/unit-globals.lsts; | ||
import SRC/unit-inference.lsts; | ||
import SRC/unit-fragments.lsts; | ||
import SRC/unit-orphans.lsts; | ||
import SRC/unit-error.lsts; | ||
import PLUGINS/FRONTEND/C/index-index.lm; | ||
import PLUGINS/FRONTEND/C/index-index.lm; | ||
|
||
# helpers | ||
if true then { | ||
let tokens = std-c-tokenize-string("[+]", "+"); | ||
assert( tokens.length == 1 ); | ||
assert( is(tokens, std-c-take-maybe(tokens, "-")) ); | ||
assert( std-c-can-take(tokens, "-") == false ); | ||
assert( std-c-can-take(tokens, "+") == true ); | ||
assert( is(tail(tokens), std-c-take-expect(tokens, "+")) ); | ||
assert( is(tail(tokens), std-c-take-maybe(tokens, "+")) ); | ||
}; | ||
|
||
# assignment operators | ||
if true then { | ||
let abc = std-c-tokenize-string("abc", "abc"); | ||
assert( std-c-parse-assignment-operator(abc).first == None :: Maybe<CString> ); | ||
if true then { | ||
let tokens = std-c-tokenize-string("[=]", "="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[*=]", "*="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"*="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[/=]", "/="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"/="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[%=]", "%="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"%="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[+=]", "+="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"+="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[-=]", "-="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"-="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[<<=]", "<<="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"<<="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[>>=]", ">>="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c">>="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[&=]", "&="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"&="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[^=]", "^="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"^="} ); | ||
}; | ||
if true then { | ||
let tokens = std-c-tokenize-string("[|=]", "|="); | ||
assert( std-c-parse-assignment-operator(tokens).first == Some{c"|="} ); | ||
}; | ||
}; |
Empty file.
Empty file.