diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-10 16:30:45 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-10 16:31:47 -0700 |
commit | df2f3f7cd69bb042a29b4fcea3ab81d641f17906 (patch) | |
tree | ecbbdbe8603b9390022e7032fbe07570843020c0 /03-lexical-syntax.md | |
parent | 839fd6e55b178b5c2a7aeaa7c9a542fd3637fe01 (diff) | |
download | scala-df2f3f7cd69bb042a29b4fcea3ab81d641f17906.tar.gz scala-df2f3f7cd69bb042a29b4fcea3ab81d641f17906.tar.bz2 scala-df2f3f7cd69bb042a29b4fcea3ab81d641f17906.zip |
github markdown: headers
Diffstat (limited to '03-lexical-syntax.md')
-rw-r--r-- | 03-lexical-syntax.md | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/03-lexical-syntax.md b/03-lexical-syntax.md index 6230bea8b3..5c6a0135c4 100644 --- a/03-lexical-syntax.md +++ b/03-lexical-syntax.md @@ -1,5 +1,4 @@ -Lexical Syntax -============== +# Lexical Syntax Scala programs are written using the Unicode Basic Multilingual Plane (_BMP_) character set; Unicode supplementary characters are not @@ -34,8 +33,7 @@ classes (Unicode general category given in parentheses): \pagebreak[1] -Identifiers ------------ +## Identifiers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar} op ::= opchar {opchar} @@ -108,8 +106,7 @@ equivalents ‘=>’ and ‘<-’, are also reserved. work-around: `` Thread.`yield`() ``{.scala} -Newline Characters ------------------- +## Newline Characters ~~~~~~~~~~~~~~~~~~~~~~~~ {.grammar} semi ::= ‘;’ | nl {nl} @@ -293,8 +290,7 @@ A single new line token is accepted ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Literals ----------- +## Literals There are literals for integer numbers, floating point numbers, characters, booleans, symbols, strings. The syntax of these literals is in @@ -549,8 +545,7 @@ identical symbol literals are equivalent with respect to reference equality. -Whitespace and Comments ------------------------ +## Whitespace and Comments Tokens may be separated by whitespace characters and/or comments. Comments come in two forms: @@ -565,8 +560,7 @@ but are required to be properly nested. Therefore, a comment like comment. -XML mode --------- +## XML mode In order to allow literal inclusion of XML fragments, lexical analysis switches from Scala mode to XML mode when encountering an opening |