| Summary: | AST does not contain "parts" for a handler with syntax error | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Xiao Bin Chen <xiaobinc> |
| Component: | EDT | Assignee: | Project Inbox <edt.compiler-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | CC: | chenzhh, pharmon |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Xiao Bin Chen
Paul, I'm assigning this defect to Compiler. When working copy compiler get AST for below handler code, the AST does not contain "part". The code has error, the stereotype is not input yet, however, ErrorCorrectingParser is expected to correct it and produce an AST tree with a Handler in it.
This error makes it impossible to give content assist when user press ctrl+space after the keyword type.
package tony;
handler h1 type
name string;
end
It seemed only happen to handler, record and programs (as below code shows) can get a correct AST tree even if its missing stereotype.
package tony;
record myrecord type
itemName string;
end
package tony;
program p1 type
variableName string;
function main ()
end
end
I was (finally) able to fix this by updating org.eclipse.edt.compiler.core.ast.ParseTable This class contains a "registry" for certain node types. I had to add the new HandlerContent nodes to this registry. I have updated the documentation on the parser maintenance (in the RBD wiki) so future updates to the parser will hopefully not run into this same problem verified in 0.7.0.v201111172101. |