|
| 1 | +<!doctype html> |
| 2 | +<html class="no-js"> |
| 3 | +<head> |
| 4 | + <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8"> |
| 5 | + <title>Literals</title> |
| 6 | +<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg"> <script>var pathToRoot = "../../../";</script> |
| 7 | + <script>document.documentElement.classList.replace("no-js","js");</script> |
| 8 | + <script>const storage = localStorage.getItem("dokka-dark-mode") |
| 9 | + if (storage == null) { |
| 10 | + const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches |
| 11 | + if (osDarkSchemePreferred === true) { |
| 12 | + document.getElementsByTagName("html")[0].classList.add("theme-dark") |
| 13 | + } |
| 14 | + } else { |
| 15 | + const savedDarkMode = JSON.parse(storage) |
| 16 | + if(savedDarkMode === true) { |
| 17 | + document.getElementsByTagName("html")[0].classList.add("theme-dark") |
| 18 | + } |
| 19 | + } |
| 20 | + </script> |
| 21 | +<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script> |
| 22 | +<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async></script> |
| 23 | +<link href="../../../styles/style.css" rel="Stylesheet"> |
| 24 | +<link href="../../../styles/main.css" rel="Stylesheet"> |
| 25 | +<link href="../../../styles/prism.css" rel="Stylesheet"> |
| 26 | +<link href="../../../styles/logo-styles.css" rel="Stylesheet"> |
| 27 | +<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet"> |
| 28 | +<script type="text/javascript" src="../../../scripts/clipboard.js" async></script> |
| 29 | +<script type="text/javascript" src="../../../scripts/navigation-loader.js" async></script> |
| 30 | +<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async></script> |
| 31 | +<script type="text/javascript" src="../../../scripts/main.js" defer></script> |
| 32 | +<script type="text/javascript" src="../../../scripts/prism.js" async></script> |
| 33 | +<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer></script></head> |
| 34 | +<body> |
| 35 | + <div class="root"> |
| 36 | +<nav class="navigation" id="navigation-wrapper"> |
| 37 | + <div class="navigation--inner"> |
| 38 | + <div class="navigation-title"> |
| 39 | + <button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button> |
| 40 | + <div class="library-name"> |
| 41 | +<a class="library-name--link" href="../../../index.html"> |
| 42 | + Parkour |
| 43 | + </a> </div> |
| 44 | + <div class="library-version">0.1.0 |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + <div class="filter-section" id="filter-section"> |
| 48 | + <button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":core:dokkaHtmlPartial/main">jvm</button> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + <div class="navigation-controls"> |
| 52 | + <button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button> |
| 53 | + <div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div> |
| 54 | + </div> |
| 55 | +</nav> |
| 56 | + <div id="container"> |
| 57 | + <div class="sidebar" id="leftColumn"> |
| 58 | + <div class="sidebar--inner" id="sideMenu"></div> |
| 59 | + </div> |
| 60 | + <div id="main"> |
| 61 | +<div class="main-content" data-page-type="classlike" id="content" pageids="parkour::io.github.cybercodernaj.parkour.lexer.internal/Literals///PointingToDeclaration//537371977"> |
| 62 | + <div class="breadcrumbs"><a href="../../index.html">parkour</a><span class="delimiter">/</span><a href="../index.html">io.github.cybercodernaj.parkour.lexer.internal</a><span class="delimiter">/</span><span class="current">Literals</span></div> |
| 63 | + <div class="cover "> |
| 64 | + <h1 class="cover"><span><span>Literals</span></span></h1> |
| 65 | + <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">class </span><a href="index.html">Literals</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/cybercoder-naj/parkour/tree/main/core/src/main/kotlin/io/github/cybercodernaj/parkour/lexer/internal/Literals.kt#L24">source</a>)</span></span></div><p class="paragraph">A configuration class to lex literals. There are only three types of literals the lexer manages.</p><ol><li><p class="paragraph">Integer literals are normally lexed with a pure stream of numbers with underscores.</p></li><li><p class="paragraph">Floating literals are normally lexed with a forced decimal point with optional exponentiation.</p></li><li><p class="paragraph">String literals are normally lexed exact strings till it finds the original match.</p></li></ol><p class="paragraph">Additionally, escape sequences are required to input special characters inside string literals.</p><span class="kdoc-tag"><h4 class="">Author</h4><p class="paragraph">Nishant Aanjaney Jalan</p></span><span class="kdoc-tag"><h4 class="">Since</h4><p class="paragraph">0.1.0</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>integer</span><wbr><span><span>Literal</span></span></u></div></span></div><div><div class="title"><p class="paragraph">a regex that detects an integer literal.</p></div></div></div></div><div class="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>floating</span><wbr><span><span>Literal</span></span></u></div></span></div><div><div class="title"><p class="paragraph">a regex that detects a floating point number literal.</p></div></div></div></div><div class="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>single</span><wbr><span>Line</span><wbr><span><span>String</span></span></u></div></span></div><div><div class="title"><p class="paragraph">a set of strings that denote the start and end enclosing strings. The lexer will throw a <a href="../../io.github.cybercodernaj.parkour.exceptions/-lexical-exception/index.html">LexicalException</a> when a string literal is not terminated in the same line.</p></div></div></div></div><div class="table-row" data-filterable-current=":core:dokkaHtmlPartial/main" data-filterable-set=":core:dokkaHtmlPartial/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>escape</span><wbr><span><span>Sequences</span></span></u></div></span></div><div><div class="title"><p class="paragraph">a list of regex that matches an escape sequence. On match, it will return a Char based on the string matched.</p></div></div></div></div></div></div></div> |
| 66 | + </div> |
| 67 | + <div class="tabbedcontent"> |
| 68 | + <div class="tabs-section" tabs-section="tabs-section"></div> |
| 69 | + <div class="tabs-section-body"></div> |
| 70 | + </div> |
| 71 | +</div> |
| 72 | + <div class="footer"> |
| 73 | + <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | +</body> |
| 79 | +</html> |
| 80 | + |
0 commit comments