Now after var AST = new PHP.Parser(PHP.Lexer(code)); we can see array of objects with description of line it is:
attributes: {
startLine: 4
endLine: 4
}
But what if code is dirty and there are multiple things in one line (if (a > b) { return a; } else { return b; }, for example)? Where is information about position into line?
Now after
var AST = new PHP.Parser(PHP.Lexer(code));
we can see array of objects with description of line it is:But what if code is dirty and there are multiple things in one line (
if (a > b) { return a; } else { return b; }
, for example)? Where is information about position into line?may be you can help me to add it by myself?
As I can see, I should start from PHP.Lexer