nl_tokens: Returns start offset ( left limit ) in line where we should stop looking for abbreviation : it’s nearest to pos location of prefix token
pl_tokens: function getStartOffset ( line , pos , prefix ) { if ( ! prefix ) { return 0 ; } const stream = new StreamReader ( line ) ; const compiledPrefix = String ( prefix ) . split ( '' ) . map ( code ) ; stream . pos = pos ; let result ; while ( ! stream . sol ( ) ) { if ( consumePair ( stream , SQUARE_BRACE_R , SQUARE_BRACE_L ) || consumePair ( stream , CURLY_BRACE_R , CURLY_BRACE_L ) ) { continue ; } result = stream . pos ; if ( consumeArray ( stream , compiledPrefix ) ) { return <mask> ; } stream . pos -- ; } return - 1 ; }