You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="platform-hinted " data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content" data-active="" data-togglable=":core:dokkaHtmlPartial/main"><divclass="symbol monospace"><spanclass="token keyword">fun </span><ahref="multiline-comments.html"><spanclass="token function">multilineComments</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">multilineComments<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html">Pair</a><spanclass="token operator"><</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html">Regex</a><spanclass="token punctuation">, </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html">Regex</a><spanclass="token operator">></span></span></span><spanclass="token punctuation">)</span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/cybercoder-naj/parkour/tree/main/core/src/main/kotlin/io/github/cybercodernaj/parkour/lexer/LexerBuilder.kt#L81">source</a>)</span></span></div><pclass="paragraph">There are two parts to <ahref="multiline-comments.html">multilineComments</a>: the starting and the ending pattern. When the lexer identifies the starting pattern, it will continue to skip to the next possible token until it meets the ending pattern.</p><divclass="sample-container"><pre><codeclass="block lang-kt" theme="idea">val myLexer = lexer {<br> // You don't need the square brackets but KDoc doesn't like it...<br> multilineComments(Regex("[/][*]") to Regex("[*][/]"))<br>}</code></pre><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><spanclass="kdoc-tag"><h4class="">Author</h4><pclass="paragraph">Nishant Aanjaney Jalan</p></span><spanclass="kdoc-tag"><h4class="">Since</h4><pclass="paragraph">0.2.0</p></span><h4class="">Parameters</h4><divclass="table"><divclass="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>single</span><wbr><span>Line</span><wbr><span><span>Comments</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">regex of the pattern the lexer will skip over to the next line.</p></div></div></div></div></div><h4class="">See also</h4><divclass="table"><divclass="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><ahref="../../io.github.cybercodernaj.parkour.lexer.internal/-lexer/-defaults/single-line-comments.html"><span>Lexer.</span><wbr><span>Defaults.</span><wbr><span>single</span><wbr><span>Line</span><wbr><span><span>Comments</span></span></a></div></span></div><div></div></div></div></div></div></div>
66
+
<divclass="platform-hinted " data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content" data-active="" data-togglable=":core:dokkaHtmlPartial/main"><divclass="symbol monospace"><spanclass="token keyword">fun </span><ahref="multiline-comments.html"><spanclass="token function">multilineComments</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">multilineComments<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html">Pair</a><spanclass="token operator"><</span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html">Regex</a><spanclass="token punctuation">, </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/index.html">Regex</a><spanclass="token operator">></span></span></span><spanclass="token punctuation">)</span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/cybercoder-naj/parkour/tree/main/core/src/main/kotlin/io/github/cybercodernaj/parkour/lexer/LexerBuilder.kt#L81">source</a>)</span></span></div><pclass="paragraph">There are two parts to <ahref="multiline-comments.html">multilineComments</a>: the starting and the ending pattern. When the lexer identifies the starting pattern, it will continue to skip to the next possible token until it meets the ending pattern.</p><divclass="sample-container"><pre><codeclass="block lang-kt" theme="idea">val myLexer = lexer {<br> // You don't need the square brackets but KDoc doesn't like it...<br> multilineComments(Regex("[/][*]") to Regex("[*][/]"))<br>}</code></pre><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><spanclass="kdoc-tag"><h4class="">Author</h4><pclass="paragraph">Nishant Aanjaney Jalan</p></span><spanclass="kdoc-tag"><h4class="">Since</h4><pclass="paragraph">0.2.0</p></span><h4class="">Parameters</h4><divclass="table"><divclass="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span>multiline</span><wbr><span><span>Comments</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">regex of the pattern the lexer will skip over to the next line.</p></div></div></div></div></div><h4class="">See also</h4><divclass="table"><divclass="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><ahref="../../io.github.cybercodernaj.parkour.lexer.internal/-lexer/-defaults/multiline-comments.html"><span>Lexer.</span><wbr><span>Defaults.</span><wbr><span>multiline</span><wbr><span><span>Comments</span></span></a></div></span></div><div></div></div></div></div></div></div>
0 commit comments