Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial UI prototype #84

Merged
merged 22 commits into from
Mar 8, 2020
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1a44720
Streamline distribution files
lam2mo Feb 12, 2020
b7eb913
Add initial code for UI
lam2mo Feb 14, 2020
f7455aa
Finish initial prototype of Swing UI
lam2mo Feb 14, 2020
d474abd
Convert ints to doubles where necessary
hinescd Jan 22, 2020
25ae532
Add jarfile to classpath in distribution script
lam2mo Feb 19, 2020
f509628
Merge pull request #85 from hinescd/master
lam2mo Feb 20, 2020
63f0124
Merge pull request #80 from lam2mo/streamline-distribution
lam2mo Feb 21, 2020
8b96948
Add newline in UI before lexing/parsing
lam2mo Feb 21, 2020
ea361e9
Reset static analysis data structures between compilations
lam2mo Feb 21, 2020
3ebd41e
Separate UI build into separate Gradle task
lam2mo Feb 21, 2020
fecd139
Merge branch 'streamline-distribution' into ui
lam2mo Feb 21, 2020
44c2bc0
Integrate UI into new streamlined build system
lam2mo Feb 21, 2020
bea5724
Revise shell commands for testing and running in the UI
lam2mo Feb 21, 2020
31556a8
Added all single-file functionality to the lj script (#79)
MrBartWolf Feb 26, 2020
b80a59b
Merge branch 'master' into ui
lam2mo Feb 26, 2020
18db5f5
Fix LJGenerateJava constructor call
lam2mo Feb 26, 2020
c54fc5a
Delete old files when compiling
lam2mo Feb 28, 2020
e345226
Show message for syntax error
lam2mo Feb 28, 2020
150cfbf
Wait for process to end when executing command
lam2mo Feb 28, 2020
ad1fe40
Copy JUnit jarfile to distribution folder
lam2mo Feb 28, 2020
da70ecb
Add scroll bars to text fields
lam2mo Feb 28, 2020
40eff5a
"Fix" test output by creating and running a helper script
lam2mo Feb 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reset static analysis data structures between compilations
This workaround clears up some of the stray error messages that show up
in the UI. A better solution is described in #89.
lam2mo committed Feb 21, 2020
commit ea361e935cd3af1fdd1ab7990aaab8a6d73d946c
20 changes: 20 additions & 0 deletions src/main/java/com/github/lessjava/LJUI.java
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@
import com.github.lessjava.generated.LJLexer;
import com.github.lessjava.generated.LJParser;
import com.github.lessjava.types.ast.ASTProgram;
import com.github.lessjava.types.ast.ASTClass;
import com.github.lessjava.types.ast.ASTClassBlock;
import com.github.lessjava.visitor.impl.BuildParentLinks;
import com.github.lessjava.visitor.impl.BuildSymbolTables;
import com.github.lessjava.visitor.impl.PrintDebugTree;
@@ -120,6 +122,24 @@ public String compile(String code)
LJASTInferConstructors inferConstructors = new LJASTInferConstructors();
LJASTCheckTypesHaveChanged checkTypesHaveChanged = new LJASTCheckTypesHaveChanged();

// reset static analysis (TODO: use fewer static data structures to
// avoid having to do this)
StaticAnalysis.resetErrors();
BuildSymbolTables.nodeSymbolTableMap.clear();
LJASTBuildClassLinks.nameClassMap.clear();
LJASTBuildClassLinks.nameClassMap.put("Object",null);
LJASTBuildClassLinks.nameClassMap.put("String", null);
LJASTBuildClassLinks.nameClassMap.put("Integer", null);
LJASTBuildClassLinks.nameClassMap.put("Double", null);
LJASTBuildClassLinks.nameClassMap.put("Boolean", null);
LJASTBuildClassLinks.nameClassMap.put("Char", null);
LJASTBuildClassLinks.nameClassMap.put("LJList", null);
LJASTBuildClassLinks.nameClassMap.put("LJSet", null);
LJASTBuildClassLinks.nameClassMap.put("LJMap", null);
ASTClass.nameClassMap.clear();
ASTClassBlock.nameAttributeMap.clear();
StaticAnalysis.collectErrors = true;

// initial processing
program.traverse(buildParentLinks);
program.traverse(new LJASTBuildClassLinks());