advanderveer / gor Goto Github PK
View Code? Open in Web Editor NEWGo render
License: Apache License 2.0
Go render
License: Apache License 2.0
query by aria labels etc
Instead of some react-like library (that we need to include)
So we can provide more clarity to the user
Or, maybe just re-use Go's actual ast types for all nodes that are the same?
Maybe use type aliases
Extensibility usecases
Entensibility possibilities
gor-<name>
for cross language extensibility (e.g protobuf)Easily add linting rules through adding
Inserting implicit semicolons is hackisch and comparing line numbers to distinguish between leading and line comments is also pretty bad: https://cs.opensource.google/go/go/+/refs/tags/go1.21.0:src/go/parser/parser.go;l=225
It could also improve code formatting.
Further acknowledged by the fact that the literal value of the "semi" colon is checked. in various places to separate an "implicit" vs an "explicit" one.
BUT: semicolon insertion seems common: https://www.reddit.com/r/ProgrammingLanguages/comments/w5m4l7/statementterminatorless_languages/
This should also allow decoupling of the parser, ideally it should only be dependant on the scanner. Not on the underlying file representation (except for error handling)
OR, maybe the comment token should carry more info about the line structure (since we only use it for lead/line information)
E.g: bit flipping
During expression parsing:
func (p *parser) parseBinaryExpr(x ast.Expr, prec1 int) ast.Expr {
if p.trace {
defer un(trace(p, "BinaryExpr"))
}
if x == nil {
x = p.parseUnaryExpr()
}
// We track the nesting here rather than at the entry for the function,
// since it can iteratively produce a nested output, and we want to
// limit how deep a structure we generate.
var n int
defer func() { p.nestLev -= n }()
for n = 1; ; n++ {
incNestLev(p)
op, oprec := p.tokPrec()
if oprec < prec1 {
return x
}
pos := p.expect(op)
y := p.parseBinaryExpr(nil, oprec+1)
x = &ast.BinaryExpr{X: x, OpPos: pos, Op: op, Y: y}
}
}
Escaping inside double quotes
Backtick (uninterpreted) string literals
And easy ways to extend it with new loaders, and customise the final url as bundled
goweb (gow.dev, goweb.dev, goweblang.com)
When building the crewlinker/nxt ui it is common to type a component property with the requirement that it only accepts certain other components (only SVG, only img tag, or only certain other components)
This should be easy to do
Also, it should be easy to type what kind of child elements a custom component accept. In fact, why is there no type checking for build-in html elements being nested inside others in Current frontend frameworks?
Maybe just through the worker interface
To allow functions to be named, imported and used as <html-tag-name/>
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.