dbaumgarten / yodk

Development Kit for Starbase's ingame programming language YOLOL
MIT License
57 stars 16 forks source link

Integer-less decimals and sqrt negation assignement vscode issues #94

Closed Slaynash closed 2 years ago

Slaynash commented 2 years ago

Describe the bug integer-less decimals (ex: .5) and sqrt negation assignement (a=-sqrt) are highlighted by vscode-yolol but work in-game

Example code

d=(dx*dx+dy*dy+dz*dz)^.5
//                   ~
// [Expected expression on right side of ^. Found Token: '.'(Unknown) [parser]]
l=-sqrt(rx^2+ry^2+rz^2)
// ~~~~
// [Expected expression on right side of -. Found Token: 'sqrt'(Keyword) [parser]]
dbaumgarten commented 2 years ago

Interesting find. The -sqrt is a simple bug in the yodk-parser. The thing with .5 is really new to me. Never seen that anywhere before, but you are right, the game just accepts it...

dbaumgarten commented 2 years ago

Published with v0.1.9.