Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
LabComm
Commits
9b3847e0
Commit
9b3847e0
authored
Nov 14, 2014
by
Anders Blomdell
Browse files
Test for sample references, crashes the compiler and not any
python code for the test harness.
parent
48f898c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
compiler/CS_CodeGen.jrag
View file @
9b3847e0
...
...
@@ -720,6 +720,10 @@ aspect CS_Class {
" not declared");
}
public void SampleRefType.CS_emitTypePrefix(CS_env env) {
env.print("Sample");
}
public void PrimType.CS_emitTypePrefix(CS_env env) {
switch (getToken()) {
case LABCOMM_STRING: { env.print("String"); } break;
...
...
@@ -844,6 +848,10 @@ aspect CS_Class {
" not declared");
}
public void SampleRefType.CS_emitType(CS_env env) {
env.print("Sample");
}
public void VoidType.CS_emitType(CS_env env) {
env.print("void");
}
...
...
compiler/Java_CodeGen.jrag
View file @
9b3847e0
...
...
@@ -938,6 +938,10 @@ aspect Java_Class {
" not declared");
}
public void SampleRefType.Java_emitType(Java_env env) {
env.print("Sample");
}
public void VoidType.Java_emitType(Java_env env) {
env.print("void");
}
...
...
compiler/Python_CodeGen.jrag
View file @
9b3847e0
...
...
@@ -152,6 +152,10 @@ aspect PythonTypes {
" not declared");
}
public void SampleRefType.Python_genSignature(Python_env env) {
env.print("labcomm.SAMPLE_REF()");
}
public void PrimType.Python_genSignature(Python_env env) {
switch (getToken()) {
case LABCOMM_BOOLEAN: { env.print("labcomm.BOOLEAN()"); } break;
...
...
test/Makefile
View file @
9b3847e0
TESTS
=
basic simple nested
TESTS
=
basic simple nested
ref
LABCOMM_JAR
=
../compiler/labcomm_compiler.jar
LABCOMM
=
java
-jar
$(LABCOMM_JAR)
...
...
test/ref.lc
0 → 100644
View file @
9b3847e0
sample sample usedBoth;
sample sample unusedEncoder;
sample sample unusedDecoder;
sample sample sample_list[4];
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment