MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / syntaxError

Method syntaxError

src/main/java/wyc/util/ErrorMessages.java:507–516  ·  view source on GitHub ↗

Report an error message. This may additionally sanity check the supplied context. @param e @param code @param context

(Syntactic.Item e, int code, Syntactic.Item... context)

Source from the content-addressed store, hash-verified

505 * @param context
506 */
507 public static void syntaxError(Syntactic.Item e, int code, Syntactic.Item... context) {
508 if(e == null) {
509 throw new IllegalArgumentException("Syntactic item cannot be null");
510 }
511 WyilFile wf = (WyilFile) e.getHeap();
512 // Allocate syntax error in the heap));
513 Syntactic.Marker m = wf.allocate(new WyilFile.Attr.SyntaxError(code, e, new Tuple<>(context)));
514 // Record marker to ensure it gets written to disk
515 wf.getModule().addAttribute(m);
516 }
517
518 // =============================================================================
519 // Helpers

Callers 11

syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
syntaxErrorMethod · 0.95
checkMethod · 0.95
executeMethod · 0.95
readMethod · 0.95

Calls 4

getModuleMethod · 0.95
addAttributeMethod · 0.80
getHeapMethod · 0.65
allocateMethod · 0.65

Tested by

no test coverage detected