Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

71%
+3 −0
Q&A Can all compiler errors be caught by language server?

This started in a comment, but got long and detailed enough that it should be an answer. This answer addresses your first point: Compiler error is syntax error No, these are not the same. Synta...

posted 1mo ago by Olin Lathrop‭

Answer
#1: Initial revision by user avatar Olin Lathrop‭ · 2026-08-10T15:49:55Z (about 1 month ago)
This started in a comment, but got long and detailed enough that it should be an answer.  This answer addresses your first point:

<blockquote>Compiler error is syntax error</blockquote>

No, these are not the same.  Syntax errors are errors the compiler catches (I assume that's what you mean by "compiler error".).  However, not all errors caught by a compiler are syntax errors.

One example is an assignment to a variable where the expression is a symbol. When that symbol is the name of a variable of the correct type, then that's fine. If the symbol is something that doesn't result in an expression or an expression of the wrong type (depending on language), then it's a compile-time error. However, it is still syntactically correct.

<blockquote>can you give an example for that example? Maybe a piece of code</blockquote>

Consider the Pascal assignment statement:

<pre>MyVar := SomeSymbol;</pre>

This statement is syntactically correct, since <code>MyVar</code> and <code>SomeSymbol</code> are valid symbol names.  If <code>SomeSymbol</code> is the name of a variable that has a compatible type to <code>MyVar</code>, there is no error at all.  The same is true if <code>SomeSymbol</code> is the name of a function that returns a value of compatible type.  However, it is an error if <code>SomeSymbol</code> is the name of a subroutine, for example.