X39 / XCG

X39s Code Generator - Creating your CST (Concrete-Syntax-Tree) with ease
3 stars 0 forks source link

Runtime-solved tokens #2

Closed X39 closed 3 years ago

X39 commented 6 years ago

For languages like SQF, tokens need to be able to get resolved at runtime. "dynamic" tokens thus need to be introduced.

possible syntax for them could look like this:

TOKEN = tokenident stmtsep ( STATICTOKEN | DYNAMICTOKEN ) sc;
STATICTOKEN = ( gt | anytext gt ) TC { questionmark TMODE };
DYNAMICTOKEN = questionmark anytext

with eg. an additional @ANNOTATION to add resolvers to the generator (which then are named in the dynamictoken anytext field)

X39 commented 6 years ago

mistakes have been made 🤦‍♂️ obviously the commit https://github.com/X39/XCG/commit/11bcda987da6b3770be1c1a1df33c56f97620ed8 actually fixes #1

X39 commented 6 years ago

implementation done in 67bb95b41b342ae53fde8127725e42beec1d629f, testing still pending