vcfxb / wright-lang Goto Github PK
View Code? Open in Web Editor NEWThe wright programming language (WIP)
Home Page: https://wright.venusblon.de/
License: MIT License
The wright programming language (WIP)
Home Page: https://wright.venusblon.de/
License: MIT License
Tracking issue for adding the self
expression to wright
Block ::= "{" [[Expression [";"]] "}"
Notes:
;
is a binary operator.void
) might be expressed as {}
.Treating blocks as expressions that return the value of Expression
poses a parsing question: should blocks be valid anywhere an expression is? Examples include
3 + { "hello"; 4 }
func(3, { 2; 1 })
In this case, if ;
keeps being an operator, blocks have the same grouping properties as parentheses ()
.
3 + ("hello"; 4)
func(3, (2; 1))
Should parenthesized expressions also be considered blocks by the grammar?
An implementation of a backend through the Stack VM crate
Tracking issue for AstEq
trait that compares AST nodes but ignores fragments.
Need to make test cases for all binary operators
Implementing a Java Virtual Machine in rust to target with wright
tracking issue for #8
Once #18 is merged we will need to add on to and modify it to also work for multiline comments. This is the tracking issue for that.
Conditional expression parser tracking issue.
Syntax should be along the lines of
"if", expr, block, ("else", "if", expr, block)*, ["else", block]
This is the tracking issue for the function call expression (func(args)
)
Currently, the semicolon ;
(used to sequence expressions) is a binary operator. However, in some cases, treating ;
this way results in weird-looking code. For example,
func(1, 2; 3, 4)
would be equivalent to
func(1, 3, 4)
As well, this creates ambiguity with the hypothetical variable declaration
"let" Identifier "=" Expression
If Expression
is a semicolon-expression.
let x = 5; 3
(let x = 5); 3
let x = (5; 3)
Some of the weirdness could be solved by having different categories of expressions for each of these cases, e.g. NonSemicolonExpression
, ExpressionOrVariableDecl
.
This is pretty far in the future, but I'll leave some platforms I'm considering targeting here, to look back at for reference later:
see https://doc.rust-lang.org/stable/reference/statements.html for a bit of reference
Should the underscore really be an expression?
Finishing the grammar in the the RustPEG file, and writing the parser and parser error structs
Tracking issue for the wright type system and type parsers
ScopedName ::= (Identifier "::")+ Identifier
Here is a list of applicable Wright expressions with in suggested precedence order.
{
a::b; // scope resolution
a.b; // member access
a..b; // half open range
a * b / c % d // multiplication/division/remainder
a + b - c; // addition/subtraction
a & b; // bitwise and
a ^ b; // bitwise/logical xor
a | b; // bitwise or
a && b; // logical and
a || b; // logical or
a < b > c <= d >= e; // comparison
a == b != c; // equality
a = b; // assign
let a = b; // variable creation and jump expressions (e.g. return)
}
This order follows the precedence order in C-like languages, with the additions of variable creation and jump expressions binding at the lowest precedence.
Expressions like { a }
and if a { b } else { c }
don't need precedence because they do not expose a bare expression at the head or the tail.
see the crate page for more info
We are switching to codespan over codemap because it is simply more up to date compared to Rust's libsyntax.
The goal (of course) is to convert all the way to using Rust's libsyntax directly. (however that's not currently possible as it is a nightly-only API right now)
Finishing up the error module and writing unit tests.
Finishing up the interpreter module and writing unit tests.
Does the compiler run on WebAssembly (wasm)? Is such feature planned?
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.