HaxeFoundation / haxe.org-comments

Repository to collect comments of our haxe.org websites
2 stars 2 forks source link

[haxe.org/manual] Language Features #18

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

Language Features - Haxe - The Cross-platform Toolkit

Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.

https://haxe.org/manual/lf.html

cancerberoSgx commented 5 years ago

Is there a reference language specification document somewhere ? In google found this old haxe 2 page referring to an specification but the link is broken: http://old.haxe.org/ref Thanks

Aurel300 commented 5 years ago

@cancerberoSgx I think the old page used to link to this document. Everything in there is now in the manual. If you were expecting a formal specification (like EBNF), there isn't one.

cancerberoSgx commented 5 years ago

OK thank so I assume the compiler is not generated from a grammar file / parser generator and is implemente with ocalm , haxe or other programming language, I will look there just to see there is some enum or something with node kind names, etc. maybe I could add a sentence with that info, do you think it will add value ? (Also I'm not sure if I would close the issue or not) Very kind on your part!

Aurel300 commented 5 years ago

No, there is no grammar file. The parser is generated from grammar.mly using camlp4. There is no definition for lexer tokens, but all nodes that you get from the AST dump are defined in haxe.macro.* types, e.g. haxe.macro.ExprDef represents the various expression types.

cancerberoSgx commented 5 years ago

@Aurel300 Thanks you save my day really, have a good one