exyi / coberec Goto Github PK
View Code? Open in Web Editor NEWC# Code Generator Framework - a tool aiming at generating COrrect REadable and BEautiful Code, with priority on the correctness.
C# Code Generator Framework - a tool aiming at generating COrrect REadable and BEautiful Code, with priority on the correctness.
for
- for(Init; Cond; Body1) { Body2 }
for
- for(var i = 0; i < len; i++) { Body }
for
- for(var i = len; i >= 0; i--) { Body }
Probably best done by something like FunctionExpression
, but resulting in a System.Linq.Expressions.Expression<X>
Automatic symbol renaming may change existing symbol names when the code is re-regenerated. We should introduce a simple key-value lock file, that will force the code generator name the symbols specifically to prevent breaking changes in a generated API.
This is currently possible though declaring static methods, but we should have helpers for it.
We need to add attributes
field to every MemberDefinition + add a method to MetadataContext to add assembly attributes.
No idea how, and probably not a big deal. Can be emulated by emitting the dynamic code with [Dynamic] attribute
Maybe, we could have a lifting validator validateArray(validator: "notEmpty")
pointer to reference, reference to pointer, fixed, stackalloc
Currently, we just use what the project is set to use.
The best way is probably to introduce a Checked/Unchecked blocks that will override the default inside of them. The alternative is to put a flag to the BinaryOperatorExpression
Add a flag to the MethodParameter type.
type ThrowExpression {
exception: Expression
type: TypeReference # @default(value: "void")
}
Low priority, and I don't have an idea how it should work.
@default(value: [])
Probably best done though ConstantExpression
supporting TypeReference, SpecializedType, TypeSignature and the System.Reflection.Type itself.
@default(value: { name: "a", values: [1, 2, 3] })
Probably best to be implemented through lowerable expression with a rewriting pass - for the omision of IEnumerable<T>
boxing
The best way is probably to add a flag to ReferenceConversionExpression
specifying if it should throw exception or return null - i.e. behave as cast or behave as the as
keyword.
Just a flag on FieldSignature
It is currently not possible to declare events.
Currently, when an empty constructor is declared it does not even call the base()
, which is done implicitly by C#. We should add a validation step that will ensure that there is exactly one base()
invocation. Maybe, we can add the call implicitly, if there is none.
type ExceptionCatchExpression {
body: Expression
exceptionParameter: ParameterExpression
filter: Expression # C# when clause
catch: Expression
}
type FinallyExpression {
body: Expression
finally: Expression
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.