- Timestamp:
- 05/08/11 21:11:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/t3q/src/org/etsi/t3q/visitor/QualityChecker.java
r38 r40 1862 1862 subsequentLogStatementNodes.add(subsequentLogStatementNode); 1863 1863 subsequentLogStatementNode = getSubsequentLogStatement(subsequentLogStatementNode); 1864 } 1864 } 1865 1865 } 1866 1866 checkLogFormat(node, logStatementText, endLine); … … 1871 1871 private LocationAST getSubsequentLogStatement(LocationAST logStatementNode) { 1872 1872 LocationAST subsequentLogStatementNode = null; 1873 LocationAST nextStatement = logStatementNode.getNthParent(3) 1874 .getNextSibling(); 1873 LocationAST nextStatement = LocationAST.resolveParentsUntilType(logStatementNode, new int[]{TTCN3ParserTokenTypes.FunctionStatement, TTCN3ParserTokenTypes.ControlStatementOrDef}).getNextSibling(); 1875 1874 1876 1875 if ((nextStatement != null) && (nextStatement.getType() == TTCN3ParserTokenTypes.SemiColon)) { … … 1880 1879 if (nextStatement.getType() == TTCN3ParserTokenTypes.FunctionStatement || 1881 1880 nextStatement.getType() == TTCN3ParserTokenTypes.ControlStatementOrDef) { 1882 LocationAST thirdChild= nextStatement1883 .getNthChild( 3);1884 if ( thirdChild!= null1885 && thirdChild.getType() == TTCN3ParserTokenTypes.LogStatement) {1886 subsequentLogStatementNode = thirdChild;1881 LocationAST logStatement = nextStatement 1882 .getNthChild(2); 1883 if (logStatement != null 1884 && logStatement.getType() == TTCN3ParserTokenTypes.LogStatement) { 1885 subsequentLogStatementNode = logStatement; 1887 1886 } 1888 1887 } … … 1905 1904 //TODO: attempt to perform resolution 1906 1905 logStatementText += ""; 1906 //TODO: consider fixing the parser, this is an ugly workaround 1907 LinkedList<LocationAST> cStringNodes = ASTUtil.findTypeNodes(logItem, TTCN3ParserTokenTypes.CharStringValue); 1908 for (LocationAST cStringNode : cStringNodes){ 1909 logStatementText+=cStringNode.getFirstChild().getText(); 1910 } 1907 1911 } 1908 1912 logItem = logItem.getNextSibling();
Note: See TracChangeset
for help on using the changeset viewer.