@TruffleBoundary public static Object createLanguageElement(RSyntaxNode element){
  assert element != null;
  if (element instanceof RSyntaxConstant) {
    Object value=((RSyntaxConstant)element).getValue();
    if (value == RMissing.instance) {
      return RSymbol.MISSING;
    }
    return value;
  }
 else   if (element instanceof RSyntaxLookup) {
    String id=((RSyntaxLookup)element).getIdentifier();
    assert id == id.intern() : element;
    return RDataFactory.createSymbol(id);
  }
 else {
    assert element instanceof RSyntaxCall || element instanceof RSyntaxFunction;
    return RDataFactory.createLanguage(element.asRNode());
  }
}

@ TruffleBoundary public static Object createLanguageElement ( RSyntaxNode element ) { assert element != null ; if ( element instanceof RSyntaxConstant ) { Object value = ( ( RSyntaxConstant ) element ) . getValue ( ) ; if ( value == RMissing . instance ) { return RSymbol . MISSING ; } return value ; } else if ( element instanceof RSyntaxLookup ) { String id = ( ( RSyntaxLookup ) element ) . getIdentifier ( ) ; assert id == id . intern ( ) : element ; return RDataFactory . createSymbol ( id ) ; } else { assert element instanceof RSyntaxCall || element instanceof RSyntaxFunction ; return RDataFactory . createLanguage ( element . asRNode ( ) ) ; } }
handles constants and symbols as special cases as required by r : create symbols for simple variables and actual values for constants .
