Closed draivin closed 10 years ago
For some reason, the error indexes beyond the end of file. For now, I've clamped the end position to end of file, which makes this example work without changing the positions in other tests.
As for different error sets: do you have a concrete example in mind? And is there a correlation to the error message text (in particular, the word before the error code)?
There does not seem to be a difference in error message texts, about the example foo = 'bar
throws the error Missing close quote character
and does not compile, but foo = 'bar'
throws the error Could not find symbol 'foo'
and still compiles.
By the way, thanks for all the quick fixes.
There does not seem to be a difference in error message texts
hmm, from reading the source, it looks as if semantic diagnostics do not stop the code emitter, whereas syntactic ones do. Perhaps I can add that distinction to the output.
By the way, thanks for all the quick fixes.
You're welcome. Just want to get rid of those bugs!-)
Would be great if you could expose that information somehow, sorry for all the trouble!
Using https://github.com/jlujan/TypeScriptServiceExample as a base, apparently it should provide the errors
Could not find symbol 'foo'
andMissing close quote character
. Using the compiler as a base it provides the errorerror TS1002: Missing close quote character
test case:
result:
Looking into this I also noticed that there are errors that cause the script to fail compilation, and there are errors that are shown at compilation time but do not prevent it, would there be any way to differentiate those two through the typescript services?