public void mergeNodes ( DdlTokenStream tokens , AstNode firstNode , AstNode secondNode ) { assert tokens != null ; assert firstNode != null ; assert secondNode != null ; int firstStartIndex = ( Integer ) firstNode . getProperty ( DDL_START_CHAR_INDEX ) ; int secondStartIndex = ( Integer ) secondNode . getProperty ( DDL_START_CHAR_INDEX ) ; int deltaLength = ( ( String ) secondNode . getProperty ( DDL_EXPRESSION ) ) . length ( ) ; Position startPosition = new Position ( firstStartIndex , 1 , 0 ) ; Position endPosition = new Position ( ( secondStartIndex + deltaLength ) , 1 , 0 ) ; String source = tokens . getContentBetween ( startPosition , endPosition ) ; firstNode . setProperty ( DDL_EXPRESSION , source ) ; firstNode . setProperty ( DDL_LENGTH , source . length ( ) ) ; }
Merges second node into first node by re - setting expression source and length .