public class TextConverter
extends de.fau.cs.osr.ptk.common.AstVisitor
n
are
dispatch(n)
- visit node n
,iterate(n)
- visit the children of node
n
,map(n)
- visit the children of node n
and gather the return values of the visit()
calls in a list,mapInPlace(n)
- visit the children of node
n
and replace each child node c
with the return
value of the call to visit(c)
.Constructor and Description |
---|
TextConverter(org.sweble.wikitext.engine.utils.SimpleWikiConfiguration config,
int wrapCol) |
Modifier and Type | Method and Description |
---|---|
protected Object |
after(de.fau.cs.osr.ptk.common.ast.AstNode node,
Object result) |
protected boolean |
before(de.fau.cs.osr.ptk.common.ast.AstNode node) |
void |
enableMapping(boolean enableMapping) |
Map<Integer,xtc.tree.Location> |
getMapping()
Return a mapping from converted text positions to original text positions.
|
void |
visit(de.fau.cs.osr.ptk.common.ast.AstNode n) |
void |
visit(org.sweble.wikitext.lazy.parser.Bold b) |
void |
visit(org.sweble.wikitext.lazy.parser.Enumeration e) |
void |
visit(org.sweble.wikitext.lazy.parser.EnumerationItem item) |
void |
visit(org.sweble.wikitext.lazy.parser.ExternalLink link) |
void |
visit(org.sweble.wikitext.lazy.parser.HorizontalRule hr) |
void |
visit(org.sweble.wikitext.lazy.encval.IllegalCodePoint n) |
void |
visit(org.sweble.wikitext.lazy.parser.ImageLink n) |
void |
visit(org.sweble.wikitext.lazy.parser.InternalLink link) |
void |
visit(org.sweble.wikitext.lazy.parser.Italics i) |
void |
visit(org.sweble.wikitext.lazy.parser.Itemization e) |
void |
visit(org.sweble.wikitext.lazy.parser.ItemizationItem i) |
void |
visit(org.sweble.wikitext.lazy.parser.MagicWord n) |
void |
visit(de.fau.cs.osr.ptk.common.ast.NodeList n) |
void |
visit(org.sweble.wikitext.engine.Page p) |
void |
visit(org.sweble.wikitext.lazy.parser.Paragraph p) |
void |
visit(org.sweble.wikitext.lazy.parser.Section s) |
void |
visit(org.sweble.wikitext.lazy.preprocessor.TagExtension n) |
void |
visit(org.sweble.wikitext.lazy.preprocessor.Template n) |
void |
visit(org.sweble.wikitext.lazy.preprocessor.TemplateArgument n) |
void |
visit(org.sweble.wikitext.lazy.preprocessor.TemplateParameter n) |
void |
visit(de.fau.cs.osr.ptk.common.ast.Text text) |
void |
visit(org.sweble.wikitext.lazy.parser.Url url) |
void |
visit(org.sweble.wikitext.lazy.parser.Whitespace w) |
void |
visit(org.sweble.wikitext.lazy.utils.XmlCharRef cr) |
void |
visit(org.sweble.wikitext.lazy.preprocessor.XmlComment n) |
void |
visit(org.sweble.wikitext.lazy.parser.XmlElement e) |
void |
visit(org.sweble.wikitext.lazy.utils.XmlEntityRef er) |
dispatch, iterate, map, mapInPlace, mapInPlace
public TextConverter(org.sweble.wikitext.engine.utils.SimpleWikiConfiguration config, int wrapCol)
public void enableMapping(boolean enableMapping)
public Map<Integer,xtc.tree.Location> getMapping()
protected boolean before(de.fau.cs.osr.ptk.common.ast.AstNode node)
before
in class de.fau.cs.osr.ptk.common.VisitorBase<de.fau.cs.osr.ptk.common.ast.AstNode>
protected Object after(de.fau.cs.osr.ptk.common.ast.AstNode node, Object result)
after
in class de.fau.cs.osr.ptk.common.VisitorBase<de.fau.cs.osr.ptk.common.ast.AstNode>
public void visit(de.fau.cs.osr.ptk.common.ast.AstNode n)
public void visit(de.fau.cs.osr.ptk.common.ast.NodeList n)
public void visit(org.sweble.wikitext.lazy.parser.Itemization e)
public void visit(org.sweble.wikitext.lazy.parser.ItemizationItem i)
public void visit(org.sweble.wikitext.lazy.parser.Enumeration e)
public void visit(org.sweble.wikitext.lazy.parser.EnumerationItem item)
public void visit(org.sweble.wikitext.engine.Page p)
public void visit(de.fau.cs.osr.ptk.common.ast.Text text)
public void visit(org.sweble.wikitext.lazy.parser.Whitespace w)
public void visit(org.sweble.wikitext.lazy.parser.Bold b)
public void visit(org.sweble.wikitext.lazy.parser.Italics i)
public void visit(org.sweble.wikitext.lazy.utils.XmlCharRef cr)
public void visit(org.sweble.wikitext.lazy.utils.XmlEntityRef er)
public void visit(org.sweble.wikitext.lazy.parser.Url url)
public void visit(org.sweble.wikitext.lazy.parser.ExternalLink link)
public void visit(org.sweble.wikitext.lazy.parser.InternalLink link)
public void visit(org.sweble.wikitext.lazy.parser.Section s)
public void visit(org.sweble.wikitext.lazy.parser.Paragraph p)
public void visit(org.sweble.wikitext.lazy.parser.HorizontalRule hr)
public void visit(org.sweble.wikitext.lazy.parser.XmlElement e)
public void visit(org.sweble.wikitext.lazy.parser.ImageLink n)
public void visit(org.sweble.wikitext.lazy.encval.IllegalCodePoint n)
public void visit(org.sweble.wikitext.lazy.preprocessor.XmlComment n)
public void visit(org.sweble.wikitext.lazy.preprocessor.Template n)
public void visit(org.sweble.wikitext.lazy.preprocessor.TemplateArgument n)
public void visit(org.sweble.wikitext.lazy.preprocessor.TemplateParameter n)
public void visit(org.sweble.wikitext.lazy.preprocessor.TagExtension n)
public void visit(org.sweble.wikitext.lazy.parser.MagicWord n)