cb2's People
cb2's Issues
Remove output from tests
our tests should not print anything to stdout or stderr.
We should try to find a ways to use a flag passed via gradle to enable this "debugging output" so we can see it online
Make sure all expression statements that are not void are printed to stderr
Currently this is not done for methods. With methods we need to make sure their return type is not void
Add short circuit evaluation
Two options:
- push values on the stack
- use gotos to save stack operations
We should not allow creation of arrays with basetype void
Maybe change type of return and parameter in byte code generator
Improve error messages
- Missing semicolons are reported missing on the next line
- Integers that are out of range are not reported as such (rework grammar to read more and report a proper error?)
Check the presence of return statements in methods
methods should not be allowed on the left side of assignments
foo() := "value"
is currently allowed (or fails because both sides have incompatible types)
Communication
@Dargaud, @analogbyte
Repo in English oder doch auf deutsch?
I personally don't like writing code in German (or mixed). Don't care about how we communicate on github though...
About irc... It's not very practical if you're not always online.
I can offer bouncer accounts, or we can use something like slack ๐
Open issues with code generation
Known errors:
- overridden parameters should be transformed
- implicit returns
- static context for sysout calls
- access to class variables from main method
- some strings need escaping
Files that cause errors:
- method_implicit_return.m
- string_copied_from_pdf.m
- member_access.m
- beispiele_timm.m
- pretty_much_everything.m
- array_declaration.m
simple expressions should not be allowed on the left side of assignments
Examples that are currently allowed:
5 + 6 := 10
-5 := "string"
Update valid test files to pass prettyPrinter tests
To do this we have three options:
- ignore certain errors (empty lines, comments, ...)
- get rid of all these errors in our valid files
- mirror all our valid files to a prettyPrinter subdirectory that would strip them of comments and whitespace...
I don't think 1. is that easy to implement, 2 would be stupid as we would loose parts of our tests, so I think we should go for 3. It will be some work.. :-)
JavaCodeGeneratrion todos
- rework print() calls to System.out.println()
- fix main method to add public and static keywords
- fix new expressions
- fix array declarations
Make sure only correct main methods are transformed
We currently only check for the name to match main.
We should also check if the return type is void and the arguments are only a string array.
In that case we transform the method to the public static void main(String[] args) array. In all other cases it should be treated as a normal non-static method
the name of the argument obviously shouldn't matter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.