You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that #1225 landed, I think we should convert .getLeadingTrivia() into a getter. This way it is easier for plugins to manipulate the AST without needing to call a function to get the results, and makes it more clear that it's an attribute of a node rather than a return value.
Tasks:
convert all .getLeadingTrivia() methods into get leadingTrivia()
add unit tests to prove we can manipulate the leading trivia and it transpiles properly. something like:
constfile=program.setFile<BrsFile>('source/main.brs',` function test() end function`);file.parser.ast.walk(()=>{FunctionStatement: (stmt)=>{editor.arrayPush(stmt.leadingTrivia,createCommentToken(''Helloworld");
}
});
testTranspile(.....)
The text was updated successfully, but these errors were encountered:
Now that #1225 landed, I think we should convert
.getLeadingTrivia()
into a getter. This way it is easier for plugins to manipulate the AST without needing to call a function to get the results, and makes it more clear that it's an attribute of a node rather than a return value.Tasks:
.getLeadingTrivia()
methods intoget leadingTrivia()
The text was updated successfully, but these errors were encountered: