DEV Community

Compilers 103 – Semantic Analyzer

Paul Lefebvre on January 30, 2018

The Semantic Analyzer is the real heart of the compiler. Its job is to validate code and figure out what the code actually means. Essentially it va...
Collapse
 
dkassen profile image
Daniel Kassen

I can understand why the integers need casting to double for the addition operation, but why is there a cast on the assignment?

Collapse
 
lefebvre profile image
Paul Lefebvre

Doesn't look like I stated it, but "sum" is treated as an integer variable for this example.