Comment

Comment

object Comment

Comments are effectively whitespace when it comes time to interpret the code.

From the docs:


comment        ::= linecomment | bockcomment
linecomment    ::= ‘;;’ linechar∗ (U+0A | eof)
linechar       ::= c:char                      (if c ≠ U+0A)
blockcomment   ::= ‘(;’ blockchar∗ ‘;)’
blockchar      ::= c:char (if c ≠ ‘;’ ∧ c ≠ ‘(’)
‘;’ (if the next character is not ‘)’)
‘(’ (if the next character is not ‘;’)
blockcomment

Methods

stripComments

fun stripComments(source: CharSequence, context: ParseContext?): StripResult

Strips all comments from the source code.

Parameters

Name Description
source: CharSequence
context: ParseContext?

ReturnValue

Name Description
StripResult