nl_tokens: Parses BASIC code and returns an abstract syntax tree
pl_tokens: function parse ( code ) { try { var labels = { } ; var root = [ ] ; var manager = new BlockManager ( ) ; var lines = code . split ( '\n' ) ; for ( var i = 0 ; i < lines . length ; i ++ ) { <mask> { var line = parseLine ( lines [ i ] . trim ( ) , i , labels , false , manager ) ; if ( line instanceof SyntaxError ) throw createLineError ( line , i ) ; if ( line . error instanceof SyntaxError ) throw createLineError ( line . error , i ) ; root [ i ] = line ; } catch ( ex ) { throw createLineError ( ex , i ) ; } } return new AbstractSyntaxTree ( root , labels , manager ) ; } catch ( ex ) { return { "error" : ex } ; } }