-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #499 from robertpanzer/fix_java_ast
Add missing method implementations to Java AST classes and fixed some…
- Loading branch information
Showing
10 changed files
with
133 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
asciidoctorj-core/src/test/java/org/asciidoctor/extension/TouchEverythingTreeprocessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.asciidoctor.extension; | ||
|
||
import org.asciidoctor.ast.AbstractBlock; | ||
import org.asciidoctor.ast.Block; | ||
import org.asciidoctor.ast.Document; | ||
|
||
import java.util.Arrays; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* This Treeprocessor doesn't do anything useful but only touch every node in the | ||
* AST so that the whole tree contains nothing but Java AST nodes instead of the Ruby originals. | ||
* This should reveal misalignments in the between the Ruby AST classes and their Java counterparts. | ||
*/ | ||
public class TouchEverythingTreeprocessor extends Treeprocessor { | ||
|
||
public TouchEverythingTreeprocessor(Map<String, Object> config) { | ||
super(config); | ||
} | ||
|
||
@Override | ||
public Document process(Document document) { | ||
|
||
touch(document); | ||
|
||
return document; | ||
} | ||
|
||
public void touch(AbstractBlock block) { | ||
|
||
if (block.getBlocks() != null) { | ||
for (AbstractBlock abstractBlock : block.getBlocks()) { | ||
touch(abstractBlock); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters