LEFT | RIGHT |
1 // Copyright (C) 2005 Google Inc. | 1 // Copyright (C) 2005 Google Inc. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 last = children.get(children.size() - 1); | 591 last = children.get(children.size() - 1); |
592 assertTrue(msg + " > " + first + " : " + first.getFilePosition(), | 592 assertTrue(msg + " > " + first + " : " + first.getFilePosition(), |
593 (first.getFilePosition().startCharInFile() | 593 (first.getFilePosition().startCharInFile() |
594 >= n.getFilePosition().startCharInFile())); | 594 >= n.getFilePosition().startCharInFile())); |
595 assertTrue(msg + " < " + last + " : " + last.getFilePosition(), | 595 assertTrue(msg + " < " + last + " : " + last.getFilePosition(), |
596 (last.getFilePosition().endCharInFile() | 596 (last.getFilePosition().endCharInFile() |
597 <= n.getFilePosition().endCharInFile())); | 597 <= n.getFilePosition().endCharInFile())); |
598 } | 598 } |
599 | 599 |
600 for (ParseTreeNode c : children) { | 600 for (ParseTreeNode c : children) { |
601 checkFilePositionInvariants( | 601 checkFilePositionInvariants(AncestorChain.instance(nChain, c)); |
602 new AncestorChain<ParseTreeNode>(nChain, c)); | |
603 } | 602 } |
604 } catch (RuntimeException ex) { | 603 } catch (RuntimeException ex) { |
605 throw new RuntimeException(msg, ex); | 604 throw new RuntimeException(msg, ex); |
606 } | 605 } |
607 } | 606 } |
608 } | 607 } |
LEFT | RIGHT |