@Test public void testTokenRefs() throws Exception {
		String action = "$id; $ID; $id.text; $id.getText(); $id.line;";
		String expected = "((AContext)_localctx).id; ((AContext)_localctx).ID; (((AContext)_localctx).id!=null?((AContext)_localctx).id.getText():null); ((AContext)_localctx).id.getText(); (((AContext)_localctx).id!=null?((AContext)_localctx).id.getLine():0);";
		testActions(attributeTemplate, "inline", action, expected);
    }
Regression test for "in antlr v4 lexer, $ translation issue in action".
https://github.com/antlr/antlr4/issues/176
tool-testsuite/test/org/antlr/v4/test/tool/TestActionTranslation.java