clemos / try-haxe

A small webapp that allows to test Haxe online
https://try.haxe.org
MIT License
126 stars 41 forks source link

"Script mode" tweaks #120

Open clemos opened 7 years ago

clemos commented 7 years ago
markknol commented 7 years ago

if you start with code comment, the complete class doesnt compile https://try.haxe.org/#A9765

// Is haxe great?
class Test {
    static function main() {
        trace("Haxe is great!");
    }
}

Build failure Test.hx:8: characters 0-5 : Unexpected class

tariqbenezza commented 7 years ago

I'm on it

clemos commented 7 years ago

We probably want to trim more than whitespaces here : https://github.com/clemos/try-haxe/blob/master/src/api/Compiler.hx#L94 We can use something like this instead of ltrim : https://try.haxe.org/#467a7