checkBareWords(globalScope.root.node, mq);
}
private static void checkBareWords(ParseTreeNode node, MessageQueue mq) {
if (node instanceof ObjProperty) {
ObjProperty op = (ObjProperty) node;
String key = op.getPropertyNameNode().getValue();
if (Keyword.isKeyword(key)) {
mq.addMessage(LinterMessageType.BARE_KEYWORD,
op.getPropertyNameNode().getFilePosition(),
MessagePart.Factory.valueOf(key));
}
}
if (Operation.is(node, Operator.MEMBER_ACCESS)) {
ParseTreeNode right = node.children().get(1);