Parser

final class Parser(val buffer: String, linkResolver: (String, Option[Inline]) => Inline) extends CharReader

Original wikiparser from NSC

Authors:

Ingo Maier

Manohar Jonnalagedda

Gilles Dubochet

class Object
trait Matchable
class Any

Value members

Concrete methods

def block(): Block
 block ::= code | title | hrule | listBlock | para 
def blockEnded(blockType: String): Unit
 eol ::= { whitespace } '\n' 
def bold(): Inline

Checks if the current line is formed with more than one space and one the listStyles

Checks if the current line is formed with more than one space and one the listStyles

def code(): Block
def document(): Body
def getInline(isInlineEnd: => Boolean, textTransform: String => String): Inline
def hrule(): Block
 hrule ::= "----" { '-' } '\n' 
def italic(): Inline

Where n and m stand for the number of spaces. When m > n, a new list is nested.

nListBlock ::= nLine { mListBlock }
    nLine ::= nSpc listStyle para '\n'

Where n and m stand for the number of spaces. When m > n, a new list is nested.

Eliminates the (common) leading spaces in all lines, based on the first line For indented pieces of code, it reduces the indent to the least whitespace prefix:

Eliminates the (common) leading spaces in all lines, based on the first line For indented pieces of code, it reduces the indent to the least whitespace prefix:

     indented example
     another indented line
     if (condition)
       then do something;
     ^ this is the least whitespace prefix
def para(): Block
 para ::= inline '\n' 
def reportError(message: String): Unit
def table(): Block
table         ::= headerRow '\n' delimiterRow '\n' dataRows '\n'
content       ::= inline-content
row           ::= '|' { content '|' }+
headerRow     ::= row
dataRows      ::= row*
align         ::= ':' '-'+ | '-'+ | '-'+ ':' | ':' '-'+ ':'
delimiterRow :: = '|' { align '|' }+
def title(): Block
 title ::= ('=' inline '=' | "==" inline "==" | ...) '\n' 

Inherited methods

def char: Char
Inherited from:
CharReader
final def check(chars: String, checkOffset: Int): Boolean
Inherited from:
CharReader
final def check(chars: String): Boolean
Inherited from:
CharReader
Inherited from:
CharReader
Inherited from:
CharReader
final def jump(chars: String): Boolean

Jumps all the characters in chars, consuming them in the process.

Jumps all the characters in chars, consuming them in the process.

Returns:

true only if the correct characters have been jumped

Inherited from:
CharReader
final def jump(ch: Char): Boolean

Jumps a character and consumes it

Jumps a character and consumes it

Returns:

true only if the correct character has been jumped

Inherited from:
CharReader
final def jumpUntil(pred: => Boolean): Int
Inherited from:
CharReader
final def jumpUntil(ch: Char): Int
Inherited from:
CharReader
Inherited from:
CharReader
final def nextChar(): Unit
Inherited from:
CharReader
final def prevChar(): Unit
Inherited from:
CharReader
final def readUntil(pred: => Boolean): String
Inherited from:
CharReader
final def readUntil(chars: String): String
Inherited from:
CharReader
final def readUntil(c: Char): String
Inherited from:
CharReader
final def repeatJump(c: Char, max: Int): Int
Inherited from:
CharReader

Inherited fields

var offset: Int
Inherited from:
CharReader