@Override
  protected JavascriptControllerDef createDefinition(String code)
      throws IOException, QuickFixException {
    setDefBuilderFields(builder);
    new JavascriptTokenizer(getParentDescriptor(), code, getLocation()).process(builder);

    Map<String, Object> map = codeToMap(code);
    Map<String, JavascriptActionDef> actions = createActionMap(map);
    builder.addActions(actions);

    String recode = mapToCode(map);
    builder.setCode(recode);

    return builder.build();
  }
 @Override
 protected ControllerDef createDefinition(Throwable error) {
   Builder builder = new Builder();
   builder.setParseError(error);
   return builder.build();
 }
 @Override
 protected ControllerDef createDefinition(Throwable error) {
   setDefBuilderFields(builder);
   builder.setParseError(error);
   return builder.build();
 }