mirror of
https://github.com/chenasraf/search-ast-parser-js.git
synced 2026-05-17 17:48:09 +00:00
feat: initial version
This commit is contained in:
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: chenasraf
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: casraf
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom:
|
||||
- "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TSH3C3ABGQM22¤cy_code=ILS&source=url"
|
||||
47
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
47
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG] "
|
||||
labels: bug, needs-triage
|
||||
assignees: chenasraf
|
||||
---
|
||||
|
||||
#### Describe the bug
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
#### How To Reproduce
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Prepare templates:
|
||||
|
||||
```text
|
||||
This is my {{ template }}
|
||||
```
|
||||
|
||||
2. Run with args/config:
|
||||
|
||||
```shell
|
||||
npx simple-scaffold@latest -t input -o output TplName
|
||||
```
|
||||
|
||||
#### Expected behavior\*\*
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
#### Logs
|
||||
|
||||
If applicable, paste your logs to help explain your problem. To see more logs, run the scaffold with
|
||||
`-v 1` to enable debug logging.
|
||||
|
||||
#### Desktop (please complete the following information):
|
||||
|
||||
- OS: [e.g. macOS, Windows, Linux]
|
||||
- OS Version: [e.g. Big Sur, 11, Ubuntu 20.04]
|
||||
- Node.js: [e.g. 16.8]
|
||||
- Simple Scaffold Version [e.g. 1.1.2]
|
||||
|
||||
#### Additional context
|
||||
|
||||
Add any other context about the problem here.
|
||||
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[FEATURE] "
|
||||
labels: enhancement, needs-triage
|
||||
assignees: chenasraf
|
||||
---
|
||||
|
||||
#### Is your feature request related to a problem? Please describe.
|
||||
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
#### Describe the solution you'd like
|
||||
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
#### Describe alternatives you've considered
|
||||
|
||||
A clear and concise description of any alternative solutions or features you've considered, if
|
||||
applicable.
|
||||
|
||||
#### Additional context
|
||||
|
||||
Add any other context or screenshots about the feature request here.
|
||||
21
.github/workflows/docs.yml
vendored
Normal file
21
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Build Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, develop ]
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
# if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip docs]')"
|
||||
if: "!contains(github.event.head_commit.message, '[skip docs]')"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18.x"
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn build-docs
|
||||
- uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./docs
|
||||
17
.github/workflows/pull_requests.yml
vendored
Normal file
17
.github/workflows/pull_requests.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: Pull Requests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, develop]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18.x"
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn build
|
||||
- run: yarn test
|
||||
23
.github/workflows/release.yml
vendored
Normal file
23
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Semantic Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, develop, feat/*, fix/* ]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18.x"
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn test
|
||||
- run: yarn build
|
||||
- run: cd ./dist && yarn pack --filename=../package.tgz
|
||||
- run: yarn semantic-release
|
||||
if: "!contains(github.event.head_commit.message, '[skip publish]')"
|
||||
env:
|
||||
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -57,6 +57,7 @@ test('should parse multiple groups and logical operators', () => {
|
||||
const lexer = new Lexer(reader)
|
||||
const parser = new Parser(lexer)
|
||||
const tokens = parser.parse()
|
||||
console.log('tokens', JSON.stringify(tokens, undefined, 2))
|
||||
expect(tokens[0]).toEqual({
|
||||
type: 'operator',
|
||||
value: 'and',
|
||||
|
||||
1
docs/.nojekyll
Normal file
1
docs/.nojekyll
Normal file
@@ -0,0 +1 @@
|
||||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
||||
57
docs/assets/custom.css
Normal file
57
docs/assets/custom.css
Normal file
@@ -0,0 +1,57 @@
|
||||
.tsd-typography table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tsd-typography table td,
|
||||
.tsd-typography table th {
|
||||
vertical-align: top;
|
||||
border: 1px solid var(--color-accent);
|
||||
padding: 6px;
|
||||
}
|
||||
.tsd-typography h1 + pre,
|
||||
.tsd-typography h2 + pre,
|
||||
.tsd-typography h3 + pre,
|
||||
.tsd-typography h4 + pre,
|
||||
.tsd-typography h5 + pre,
|
||||
.tsd-typography h6 + pre,
|
||||
/* */
|
||||
.tsd-typography h1 + table,
|
||||
.tsd-typography h2 + table,
|
||||
.tsd-typography h3 + table,
|
||||
.tsd-typography h4 + table,
|
||||
.tsd-typography h5 + table,
|
||||
.tsd-typography h6 + table {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.tsd-typography pre + a + h1,
|
||||
.tsd-typography pre + a + h2,
|
||||
.tsd-typography pre + a + h3,
|
||||
.tsd-typography pre + a + h4,
|
||||
.tsd-typography pre + a + h5,
|
||||
.tsd-typography pre + a + h6,
|
||||
/* */
|
||||
.tsd-typography table + a + h1,
|
||||
.tsd-typography table + a + h2,
|
||||
.tsd-typography table + a + h3,
|
||||
.tsd-typography table + a + h4,
|
||||
.tsd-typography table + a + h5,
|
||||
.tsd-typography table + a + h6 {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
/*
|
||||
.tsd-index-accordion[data-key*="Configuration."] ul.tsd-nested-navigation,
|
||||
.tsd-index-accordion[data-key*="Configuration."] .tsd-accordion-summary > svg,
|
||||
.tsd-index-accordion[data-key="Changelog"] ul.tsd-nested-navigation,
|
||||
.tsd-index-accordion[data-key="Changelog"] .tsd-accordion-summary > svg,
|
||||
.tsd-index-accordion[data-key="Configuration"] li:nth-child(n + 6) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tsd-index-accordion[data-key*="Configuration."],
|
||||
.tsd-index-accordion[data-key="Changelog"] {
|
||||
margin-left: 0;
|
||||
}
|
||||
*/
|
||||
85
docs/assets/highlight.css
Normal file
85
docs/assets/highlight.css
Normal file
@@ -0,0 +1,85 @@
|
||||
:root {
|
||||
--light-hl-0: #0000FF;
|
||||
--dark-hl-0: #569CD6;
|
||||
--light-hl-1: #000000;
|
||||
--dark-hl-1: #D4D4D4;
|
||||
--light-hl-2: #0070C1;
|
||||
--dark-hl-2: #4FC1FF;
|
||||
--light-hl-3: #001080;
|
||||
--dark-hl-3: #9CDCFE;
|
||||
--light-hl-4: #A31515;
|
||||
--dark-hl-4: #CE9178;
|
||||
--light-hl-5: #795E26;
|
||||
--dark-hl-5: #DCDCAA;
|
||||
--light-hl-6: #AF00DB;
|
||||
--dark-hl-6: #C586C0;
|
||||
--light-hl-7: #000000;
|
||||
--dark-hl-7: #C8C8C8;
|
||||
--light-hl-8: #008000;
|
||||
--dark-hl-8: #6A9955;
|
||||
--light-code-background: #FFFFFF;
|
||||
--dark-code-background: #1E1E1E;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) { :root {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--code-background: var(--light-code-background);
|
||||
} }
|
||||
|
||||
@media (prefers-color-scheme: dark) { :root {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--code-background: var(--dark-code-background);
|
||||
} }
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--code-background: var(--light-code-background);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--code-background: var(--dark-code-background);
|
||||
}
|
||||
|
||||
.hl-0 { color: var(--hl-0); }
|
||||
.hl-1 { color: var(--hl-1); }
|
||||
.hl-2 { color: var(--hl-2); }
|
||||
.hl-3 { color: var(--hl-3); }
|
||||
.hl-4 { color: var(--hl-4); }
|
||||
.hl-5 { color: var(--hl-5); }
|
||||
.hl-6 { color: var(--hl-6); }
|
||||
.hl-7 { color: var(--hl-7); }
|
||||
.hl-8 { color: var(--hl-8); }
|
||||
pre, code { background: var(--code-background); }
|
||||
58
docs/assets/main.js
Normal file
58
docs/assets/main.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/assets/search.js
Normal file
1
docs/assets/search.js
Normal file
File diff suppressed because one or more lines are too long
1365
docs/assets/style.css
Normal file
1365
docs/assets/style.css
Normal file
File diff suppressed because it is too large
Load Diff
185
docs/classes/BufferReader.html
Normal file
185
docs/classes/BufferReader.html
Normal file
@@ -0,0 +1,185 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BufferReader | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="BufferReader.html">BufferReader</a></li></ul>
|
||||
<h1>Class BufferReader</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Buffer Input Reader</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">BufferReader</span></li></ul></section>
|
||||
<section class="tsd-panel">
|
||||
<h4>Implements</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="InputReader.html" class="tsd-signature-type tsd-kind-class">InputReader</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L20">reader.ts:20</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="BufferReader.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="BufferReader.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>index</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="BufferReader.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="BufferReader.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="BufferReader.html#setIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a>
|
||||
<a href="BufferReader.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BufferReader"><span class="tsd-kind-constructor-signature">new <wbr/>Buffer<wbr/>Reader</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BufferReader.html" class="tsd-signature-type tsd-kind-class">BufferReader</a><a href="#constructor.new_BufferReader" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">buffer</span>: <span class="tsd-signature-type ">Buffer</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="BufferReader.html" class="tsd-signature-type tsd-kind-class">BufferReader</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L24">reader.ts:24</a></li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The current index of the input stream</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#index">index</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L22">reader.ts:22</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peek at the next character in the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#peek">peek</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L29">reader.ts:29</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consume the next character in the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#consume">consume</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L33">reader.ts:33</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="setIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>set<wbr/>Index</span><a href="#setIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="setIndex.setIndex-1"><span class="tsd-kind-call-signature">set<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setIndex.setIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#setIndex">setIndex</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L39">reader.ts:39</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Check if the input stream is at the end of the file</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#isEOF">isEOF</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L43">reader.ts:43</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#setIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
194
docs/classes/ILexer.html
Normal file
194
docs/classes/ILexer.html
Normal file
@@ -0,0 +1,194 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ILexer | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="ILexer.html">ILexer</a></li></ul>
|
||||
<h1>Class ILexer<code class="tsd-tag ts-flagAbstract">Abstract</code> </h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>A lexer interface</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">ILexer</span></li></ul></section>
|
||||
<section class="tsd-panel">
|
||||
<h4>Implemented by</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="Lexer.html" class="tsd-signature-type tsd-kind-class">Lexer</a></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L34">lexer.ts:34</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="ILexer.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="ILexer.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>index</span></a>
|
||||
<a href="ILexer.html#peekIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>peek<wbr/>Index</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="ILexer.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="ILexer.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="ILexer.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
<a href="ILexer.html#parse" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a>
|
||||
<a href="ILexer.html#setIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_ILexer"><span class="tsd-kind-constructor-signature">new ILexer</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a><a href="#constructor.new_ILexer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-returns-title">Returns <a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a></h4></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the lexer</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L46">lexer.ts:46</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="peekIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>peek<wbr/>Index</span><a href="#peekIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">peek<wbr/>Index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The index of the next token</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L48">lexer.ts:48</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peek at the next {n} token(s)</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L36">lexer.ts:36</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consume the next {n} token(s)</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L38">lexer.ts:38</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Check if the lexer is at the end of the input</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L40">lexer.ts:40</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="parse" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>parse</span><a href="#parse" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="parse.parse-1"><span class="tsd-kind-call-signature">parse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><span class="tsd-signature-symbol">[]</span><a href="#parse.parse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Parse the input into tokens</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L42">lexer.ts:42</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="setIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>set<wbr/>Index</span><a href="#setIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="setIndex.setIndex-1"><span class="tsd-kind-call-signature">set<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setIndex.setIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the lexer</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L44">lexer.ts:44</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#peekIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>peek<wbr/>Index</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li>
|
||||
<li><a href="#parse" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a></li>
|
||||
<li><a href="#setIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
185
docs/classes/IParser.html
Normal file
185
docs/classes/IParser.html
Normal file
@@ -0,0 +1,185 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IParser | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="IParser.html">IParser</a></li></ul>
|
||||
<h1>Class IParser<code class="tsd-tag ts-flagAbstract">Abstract</code> </h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Parser abstract class</p>
|
||||
|
||||
<h3>See</h3><p><a href="Parser.html" class="tsd-kind-class">Parser</a></p>
|
||||
|
||||
<h3>Abstract</h3></div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">IParser</span>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="Parser.html" class="tsd-signature-type tsd-kind-class">Parser</a></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L67">parser.ts:67</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="IParser.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="IParser.html#lexer" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>lexer</span></a>
|
||||
<a href="IParser.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="IParser.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="IParser.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="IParser.html#parse" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a>
|
||||
<a href="IParser.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_IParser"><span class="tsd-kind-constructor-signature">new IParser</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">lexer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="IParser.html" class="tsd-signature-type tsd-kind-class">IParser</a><a href="#constructor.new_IParser" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">lexer</span>: <a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="IParser.html" class="tsd-signature-type tsd-kind-class">IParser</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L73">parser.ts:73</a></li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="lexer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>lexer</span><a href="#lexer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">lexer</span><span class="tsd-signature-symbol">:</span> <a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The lexer to use for parsing.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L69">parser.ts:69</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The current index of the parser.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L71">parser.ts:71</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peeks at the next {n} token(s).</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L78">parser.ts:78</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consumes the next {n} token(s).</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L80">parser.ts:80</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="parse" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>parse</span><a href="#parse" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="parse.parse-1"><span class="tsd-kind-call-signature">parse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span><a href="#parse.parse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Parses the tokens.</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L82">parser.ts:82</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Checks if the parser is at the end of the input.</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L84">parser.ts:84</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#lexer" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lexer</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#parse" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
184
docs/classes/InputReader.html
Normal file
184
docs/classes/InputReader.html
Normal file
@@ -0,0 +1,184 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>InputReader | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="InputReader.html">InputReader</a></li></ul>
|
||||
<h1>Class InputReader<T><code class="tsd-tag ts-flagAbstract">Abstract</code> </h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Abstract Input Reader</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel">
|
||||
<h4>Type Parameters</h4>
|
||||
<ul class="tsd-type-parameter-list">
|
||||
<li>
|
||||
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">InputReader</span></li></ul></section>
|
||||
<section class="tsd-panel">
|
||||
<h4>Implemented by</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="BufferReader.html" class="tsd-signature-type tsd-kind-class">BufferReader</a></li>
|
||||
<li><a href="StringReader.html" class="tsd-signature-type tsd-kind-class">StringReader</a></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L4">reader.ts:4</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="InputReader.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="InputReader.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>index</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="InputReader.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="InputReader.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="InputReader.html#setIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a>
|
||||
<a href="InputReader.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_InputReader"><span class="tsd-kind-constructor-signature">new <wbr/>Input<wbr/>Reader</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="InputReader.html" class="tsd-signature-type tsd-kind-class">InputReader</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_InputReader" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<section class="tsd-panel">
|
||||
<h4>Type Parameters</h4>
|
||||
<ul class="tsd-type-parameter-list">
|
||||
<li>
|
||||
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
||||
<h4 class="tsd-returns-title">Returns <a href="InputReader.html" class="tsd-signature-type tsd-kind-class">InputReader</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The current index of the input stream</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L14">reader.ts:14</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peek at the next character in the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L6">reader.ts:6</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consume the next character in the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L8">reader.ts:8</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="setIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>set<wbr/>Index</span><a href="#setIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="setIndex.setIndex-1"><span class="tsd-kind-call-signature">set<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setIndex.setIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L10">reader.ts:10</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Check if the input stream is at the end of the file</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L12">reader.ts:12</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#setIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
208
docs/classes/Lexer.html
Normal file
208
docs/classes/Lexer.html
Normal file
@@ -0,0 +1,208 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Lexer | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="Lexer.html">Lexer</a></li></ul>
|
||||
<h1>Class Lexer</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>The default lexer</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Lexer</span></li></ul></section>
|
||||
<section class="tsd-panel">
|
||||
<h4>Implements</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L52">lexer.ts:52</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="Lexer.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Lexer.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>index</span></a>
|
||||
<a href="Lexer.html#peekIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>peek<wbr/>Index</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="Lexer.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="Lexer.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="Lexer.html#parse" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a>
|
||||
<a href="Lexer.html#setIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a>
|
||||
<a href="Lexer.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Lexer"><span class="tsd-kind-constructor-signature">new <wbr/>Lexer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">reader</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Lexer.html" class="tsd-signature-type tsd-kind-class">Lexer</a><a href="#constructor.new_Lexer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">reader</span>: <a href="InputReader.html" class="tsd-signature-type tsd-kind-class">InputReader</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="Lexer.html" class="tsd-signature-type tsd-kind-class">Lexer</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L61">lexer.ts:61</a></li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the lexer</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#index">index</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L56">lexer.ts:56</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="peekIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>peek<wbr/>Index</span><a href="#peekIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">peek<wbr/>Index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The index of the next token</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#peekIndex">peekIndex</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L57">lexer.ts:57</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peek at the next {n} token(s)</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#peek">peek</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L65">lexer.ts:65</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consume the next {n} token(s)</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#consume">consume</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L81">lexer.ts:81</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="parse" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>parse</span><a href="#parse" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="parse.parse-1"><span class="tsd-kind-call-signature">parse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><span class="tsd-signature-symbol">[]</span><a href="#parse.parse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Parse the input into tokens</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="../interfaces/LexerTokenValue.html" class="tsd-signature-type tsd-kind-interface">LexerTokenValue</a><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#parse">parse</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L113">lexer.ts:113</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="setIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>set<wbr/>Index</span><a href="#setIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="setIndex.setIndex-1"><span class="tsd-kind-call-signature">set<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setIndex.setIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the lexer</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#setIndex">setIndex</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L121">lexer.ts:121</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Check if the lexer is at the end of the input</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="ILexer.html">ILexer</a>.<a href="ILexer.html#isEOF">isEOF</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L125">lexer.ts:125</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#peekIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>peek<wbr/>Index</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#parse" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a></li>
|
||||
<li><a href="#setIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
192
docs/classes/Parser.html
Normal file
192
docs/classes/Parser.html
Normal file
@@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Parser | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="Parser.html">Parser</a></li></ul>
|
||||
<h1>Class Parser</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Parser abstract class</p>
|
||||
|
||||
<h3>See</h3><p><a href="Parser.html" class="tsd-kind-class">Parser</a></p>
|
||||
|
||||
<h3>Abstract</h3></div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="IParser.html" class="tsd-signature-type tsd-kind-class">IParser</a>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Parser</span></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L93">parser.ts:93</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="Parser.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Parser.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>index</span></a>
|
||||
<a href="Parser.html#lexer" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lexer</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="Parser.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="Parser.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="Parser.html#parse" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a>
|
||||
<a href="Parser.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Parser"><span class="tsd-kind-constructor-signature">new <wbr/>Parser</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">lexer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Parser.html" class="tsd-signature-type tsd-kind-class">Parser</a><a href="#constructor.new_Parser" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">lexer</span>: <a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="Parser.html" class="tsd-signature-type tsd-kind-class">Parser</a></h4><aside class="tsd-sources">
|
||||
<p>Overrides <a href="IParser.html">IParser</a>.<a href="IParser.html#constructor">constructor</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L98">parser.ts:98</a></li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The current index of the parser.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Overrides <a href="IParser.html">IParser</a>.<a href="IParser.html#index">index</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L94">parser.ts:94</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lexer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>lexer</span><a href="#lexer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">lexer</span><span class="tsd-signature-symbol">:</span> <a href="ILexer.html" class="tsd-signature-type tsd-kind-class">ILexer</a></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The lexer to use for parsing.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Inherited from <a href="IParser.html">IParser</a>.<a href="IParser.html#lexer">lexer</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L69">parser.ts:69</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peeks at the next {n} token(s).</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a></h4><aside class="tsd-sources">
|
||||
<p>Overrides <a href="IParser.html">IParser</a>.<a href="IParser.html#peek">peek</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L103">parser.ts:103</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consumes the next {n} token(s).</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a></h4><aside class="tsd-sources">
|
||||
<p>Overrides <a href="IParser.html">IParser</a>.<a href="IParser.html#consume">consume</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L116">parser.ts:116</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="parse" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>parse</span><a href="#parse" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="parse.parse-1"><span class="tsd-kind-call-signature">parse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span><a href="#parse.parse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Parses the tokens.</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
||||
<p>Overrides <a href="IParser.html">IParser</a>.<a href="IParser.html#parse">parse</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L148">parser.ts:148</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Checks if the parser is at the end of the input.</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<p>Overrides <a href="IParser.html">IParser</a>.<a href="IParser.html#isEOF">isEOF</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L163">parser.ts:163</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#lexer" class="tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lexer</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#parse" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>parse</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
185
docs/classes/StringReader.html
Normal file
185
docs/classes/StringReader.html
Normal file
@@ -0,0 +1,185 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>StringReader | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="StringReader.html">StringReader</a></li></ul>
|
||||
<h1>Class StringReader</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>String Input Reader</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">StringReader</span></li></ul></section>
|
||||
<section class="tsd-panel">
|
||||
<h4>Implements</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="InputReader.html" class="tsd-signature-type tsd-kind-class">InputReader</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L51">reader.ts:51</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="StringReader.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="StringReader.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>index</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="StringReader.html#peek" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>peek</span></a>
|
||||
<a href="StringReader.html#consume" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a>
|
||||
<a href="StringReader.html#setIndex" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a>
|
||||
<a href="StringReader.html#isEOF" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_StringReader"><span class="tsd-kind-constructor-signature">new <wbr/>String<wbr/>Reader</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="StringReader.html" class="tsd-signature-type tsd-kind-class">StringReader</a><a href="#constructor.new_StringReader" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">string</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="StringReader.html" class="tsd-signature-type tsd-kind-class">StringReader</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L55">reader.ts:55</a></li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The current index of the input stream</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#index">index</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L53">reader.ts:53</a></li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="peek" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>peek</span><a href="#peek" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="peek.peek-1"><span class="tsd-kind-call-signature">peek</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#peek.peek-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Peek at the next character in the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#peek">peek</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L59">reader.ts:59</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="consume" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>consume</span><a href="#consume" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="consume.consume-1"><span class="tsd-kind-call-signature">consume</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#consume.consume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Consume the next character in the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#consume">consume</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L63">reader.ts:63</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="setIndex" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>set<wbr/>Index</span><a href="#setIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="setIndex.setIndex-1"><span class="tsd-kind-call-signature">set<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setIndex.setIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Set the index of the input stream</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#setIndex">setIndex</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L69">reader.ts:69</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="isEOF" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>isEOF</span><a href="#isEOF" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="isEOF.isEOF-1"><span class="tsd-kind-call-signature">isEOF</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEOF.isEOF-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Check if the input stream is at the end of the file</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
||||
<p>Implementation of <a href="InputReader.html">InputReader</a>.<a href="InputReader.html#isEOF">isEOF</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/reader.ts#L73">reader.ts:73</a></li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#index" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>index</span></a></li>
|
||||
<li><a href="#peek" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>peek</span></a></li>
|
||||
<li><a href="#consume" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>consume</span></a></li>
|
||||
<li><a href="#setIndex" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Index</span></a></li>
|
||||
<li><a href="#isEOF" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>isEOF</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="StringReader.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
93
docs/enums/LexerState.html
Normal file
93
docs/enums/LexerState.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LexerState | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="LexerState.html">LexerState</a></li></ul>
|
||||
<h1>Enumeration LexerState</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>The state of the lexer</p>
|
||||
</div></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L4">lexer.ts:4</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Enumeration Members</h3>
|
||||
<div class="tsd-index-list"><a href="LexerState.html#default" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>default</span></a>
|
||||
<a href="LexerState.html#inPhrase" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>in<wbr/>Phrase</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Enumeration Members</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="default" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>default</span><a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Default state, reading words</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L6">lexer.ts:6</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="inPhrase" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>in<wbr/>Phrase</span><a href="#inPhrase" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">in<wbr/>Phrase</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">1</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>In phrase mode, reading characters until quote terminator</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L8">lexer.ts:8</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#default" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>default</span></a></li>
|
||||
<li><a href="#inPhrase" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>in<wbr/>Phrase</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="LexerState.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
120
docs/enums/LexerToken.html
Normal file
120
docs/enums/LexerToken.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LexerToken | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="LexerToken.html">LexerToken</a></li></ul>
|
||||
<h1>Enumeration LexerToken</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>The type of token</p>
|
||||
</div></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L12">lexer.ts:12</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Enumeration Members</h3>
|
||||
<div class="tsd-index-list"><a href="LexerToken.html#group" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>group</span></a>
|
||||
<a href="LexerToken.html#operator" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>operator</span></a>
|
||||
<a href="LexerToken.html#word" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>word</span></a>
|
||||
<a href="LexerToken.html#quote" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>quote</span></a>
|
||||
<a href="LexerToken.html#whitespace" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>whitespace</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Enumeration Members</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="group" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>group</span><a href="#group" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">group</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"group"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>A group token, either ( or )</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L14">lexer.ts:14</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="operator" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>operator</span><a href="#operator" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">operator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"operator"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>An operator token, either and, or, | or & (case-insensitive)</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L16">lexer.ts:16</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="word" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>word</span><a href="#word" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">word</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"word"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>A word token, a sequence of alphanumeric characters</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L18">lexer.ts:18</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="quote" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>quote</span><a href="#quote" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">quote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"quote"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>A quote token, either ' or "</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L20">lexer.ts:20</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="whitespace" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>whitespace</span><a href="#whitespace" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">whitespace</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"whitespace"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>A whitespace token, a sequence of whitespace characters</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L22">lexer.ts:22</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#group" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>group</span></a></li>
|
||||
<li><a href="#operator" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>operator</span></a></li>
|
||||
<li><a href="#word" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>word</span></a></li>
|
||||
<li><a href="#quote" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>quote</span></a></li>
|
||||
<li><a href="#whitespace" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>whitespace</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="LexerToken.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
84
docs/enums/ParserState.html
Normal file
84
docs/enums/ParserState.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ParserState | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="ParserState.html">ParserState</a></li></ul>
|
||||
<h1>Enumeration ParserState</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>The state of the parser.</p>
|
||||
</div></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L88">parser.ts:88</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Enumeration Members</h3>
|
||||
<div class="tsd-index-list"><a href="ParserState.html#default" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>default</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Enumeration Members</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="default" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>default</span><a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-enum-member">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">0</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The default state.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L90">parser.ts:90</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#default" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>default</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="ParserState.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
80
docs/functions/checkItem.html
Normal file
80
docs/functions/checkItem.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>checkItem | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="checkItem.html">checkItem</a></li></ul>
|
||||
<h1>Function checkItem</h1></div>
|
||||
<section class="tsd-panel">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="checkItem"><span class="tsd-kind-call-signature">check<wbr/>Item</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">check</span>, <span class="tsd-kind-parameter">item</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#checkItem" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Check if item matches a single token</p>
|
||||
|
||||
<h3>Example</h3><pre><code class="language-ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">check</span><span class="hl-1"> = </span><span class="hl-5">parse</span><span class="hl-1">(</span><span class="hl-4">'Hello OR (World AND Bar)'</span><span class="hl-1">)</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">item</span><span class="hl-1"> = </span><span class="hl-4">'Hello'</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">matches</span><span class="hl-1"> = </span><span class="hl-5">checkItem</span><span class="hl-1">(</span><span class="hl-3">check</span><span class="hl-1">, </span><span class="hl-3">item</span><span class="hl-1">)</span><br/><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-3">matches</span><span class="hl-1">) </span><span class="hl-8">// true</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">check</span>: <a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a></h5>
|
||||
<div class="tsd-comment tsd-typography"><p>token to check</p>
|
||||
</div></li>
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">item</span>: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography"><p>item to check</p>
|
||||
</div></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true if item matches token</p>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in utils.ts:56</li></ul></aside></li></ul></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="checkItem.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
125
docs/functions/filter.html
Normal file
125
docs/functions/filter.html
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>filter | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="filter.html">filter</a></li></ul>
|
||||
<h1>Function filter</h1></div>
|
||||
<section class="tsd-panel">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="filter"><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">parsed</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">map</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Filter data based on parsed query</p>
|
||||
|
||||
<h3>Example</h3><pre><code class="language-ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">data</span><span class="hl-1"> = [</span><span class="hl-4">'Hello'</span><span class="hl-1">, </span><span class="hl-4">'World'</span><span class="hl-1">, </span><span class="hl-4">'Foo'</span><span class="hl-1">, </span><span class="hl-4">'Bar'</span><span class="hl-1">]</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">parsed</span><span class="hl-1"> = </span><span class="hl-5">parse</span><span class="hl-1">(</span><span class="hl-4">'Hello OR (World AND Bar)'</span><span class="hl-1">)</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">filtered</span><span class="hl-1"> = </span><span class="hl-5">filter</span><span class="hl-1">(</span><span class="hl-3">parsed</span><span class="hl-1">, </span><span class="hl-3">data</span><span class="hl-1">)</span><br/><span class="hl-3">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-3">filtered</span><span class="hl-1">) </span><span class="hl-8">// ['Hello', 'World', 'Bar']</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">parsed</span>: <a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography"><p>parsed query</p>
|
||||
</div></li>
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography"><p>data to filter</p>
|
||||
</div></li>
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">map</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">item</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span></h5>
|
||||
<div class="tsd-comment tsd-typography"><p>map function to apply to data before filtering</p>
|
||||
</div>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">item</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">item</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></li></ul></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>filtered data</p>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in utils.ts:19</li></ul></aside></li>
|
||||
<li class="tsd-signature tsd-anchor-link" id="filter-1"><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">parsed</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">map</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#filter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<section class="tsd-panel">
|
||||
<h4>Type Parameters</h4>
|
||||
<ul class="tsd-type-parameter-list">
|
||||
<li>
|
||||
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">parsed</span>: <a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span></h5></li>
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h5></li>
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">map</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">item</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span></h5>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">item</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">item</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></li></ul></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in utils.ts:24</li></ul></aside></li></ul></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="filter.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
73
docs/functions/parse.html
Normal file
73
docs/functions/parse.html
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>parse | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="parse.html">parse</a></li></ul>
|
||||
<h1>Function parse</h1></div>
|
||||
<section class="tsd-panel">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="parse"><span class="tsd-kind-call-signature">parse</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">search</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span><a href="#parse" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Parse a search string into a list of tokens.</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">search</span>: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography"><p>The search string to parse.</p>
|
||||
</div></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="../types/ParserToken.html" class="tsd-signature-type tsd-kind-type-alias">ParserToken</a><span class="tsd-signature-symbol">[]</span></h4><p>A list of tokens.</p>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/index.ts#L16">index.ts:16</a></li></ul></aside></li></ul></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="parse.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
167
docs/index.html
Normal file
167
docs/index.html
Normal file
@@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><link rel="stylesheet" href="assets/custom.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base=".">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<h2>search-parse - v0.1.0</h2></div>
|
||||
<div class="tsd-panel tsd-typography"><h1>Search Query AST Parser for JS</h1>
|
||||
|
||||
<p>This is a package for JS applications that parses search queries with the common search operator
|
||||
features such as logical or/and, grouping, phrases (in quotes), etc.</p>
|
||||
<p>This package <strong>does not</strong> implement a search mechanism using the resulting tree, that is up to the
|
||||
package user (you). It only returns the logical tree of search.</p>
|
||||
<hr>
|
||||
<!-- toc -->
|
||||
<details>
|
||||
<summary>Table of contents</summary>
|
||||
|
||||
<ul>
|
||||
<li><a href="#example-results">Example results</a></li>
|
||||
<li><a href="#how-to-use">How to use</a></li>
|
||||
<li><a href="#supported-operators">Supported operators</a><ul>
|
||||
<li><a href="#implemented">Implemented</a></li>
|
||||
<li><a href="#to-do">To Do</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
<!-- /toc -->
|
||||
|
||||
<hr>
|
||||
<a id="md:example-results" class="tsd-anchor"></a><h2><a href="#md:example-results">Example results</a></h2><p><strong>Input:</strong> <code>orange OR "golden apple"</code></p>
|
||||
<p><strong>Explanation:</strong> the word "orange" or the exact phrase "golden apple"</p>
|
||||
<p><strong>Output</strong>:</p>
|
||||
<pre><code class="language-js"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">result</span><span class="hl-1"> = [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'operator'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'or'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">left:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'orange'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-3">right:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'phrase'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'golden apple'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">quote:</span><span class="hl-1"> </span><span class="hl-4">'"'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">]</span>
|
||||
</code><button>Copy</button></pre>
|
||||
<p><strong>Input:</strong> <code>(mango banana lemon) OR apple -pineapple</code></p>
|
||||
<p><strong>Explanation:</strong> Either one of the words: "mango", "banana", or "lemon"; OR the word "apple";
|
||||
exclude all results containing "pineapple"</p>
|
||||
<p><strong>Output</strong>:</p>
|
||||
<pre><code class="language-js"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">result</span><span class="hl-1"> = [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'operator'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'or'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">left:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'group'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">children:</span><span class="hl-1"> [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'mango'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'banana'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'lemon'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-3">right:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'apple'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'exclude'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'pineapple'</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">]</span>
|
||||
</code><button>Copy</button></pre>
|
||||
<a id="md:how-to-use" class="tsd-anchor"></a><h2><a href="#md:how-to-use">How to use</a></h2><p>Install the package using <code>npm</code> or <code>yarn</code>:</p>
|
||||
<pre><code class="language-shell"><span class="hl-5">npm</span><span class="hl-1"> </span><span class="hl-4">install</span><span class="hl-1"> </span><span class="hl-4">search-ast-parser</span><br/><span class="hl-5">yarn</span><span class="hl-1"> </span><span class="hl-4">add</span><span class="hl-1"> </span><span class="hl-4">search-ast-parser</span>
|
||||
</code><button>Copy</button></pre>
|
||||
<p>Simply pass a string to the parse function to get the results.</p>
|
||||
<pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-3">parse</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-4">'search-ast-parser'</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">results</span><span class="hl-1"> = </span><span class="hl-5">parse</span><span class="hl-1">(</span><span class="hl-4">'(mango banana lemon) OR apple -pineapple'</span><span class="hl-1">)</span>
|
||||
</code><button>Copy</button></pre>
|
||||
<a id="md:supported-operators" class="tsd-anchor"></a><h2><a href="#md:supported-operators">Supported operators</a></h2><p>This is the comprehensive list of operators and their object results:</p>
|
||||
<a id="md:implemented" class="tsd-anchor"></a><h3><a href="#md:implemented">Implemented</a></h3><ul>
|
||||
<li><p><strong>Word:</strong> <code>example</code></p>
|
||||
<p>Any single word. Only alpha-numeric characters, dashes and underscores are considered a word. The
|
||||
rest is considered whitespace, which is ignored by the parser, but will cause the surrounding
|
||||
tokens to be broken apart.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'word'</span><span class="hl-1">, </span><span class="hl-8">// constant</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'example'</span><span class="hl-1"> </span><span class="hl-8">// this is the actual word in the string</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
<li><p><strong>Phrase:</strong> <code>"an example"</code> or <code>'an example'</code></p>
|
||||
<p>A phrase can contain one or more characters. These characters are used as is and not validated as
|
||||
words, so they can include all sorts of special characters.</p>
|
||||
<p>A phrase can start with either a single or double quote, and must terminate using the same quote.
|
||||
The other type of quote than the one starting this sequence is ignored and considered part of the
|
||||
phrase itself when it inside it.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'phrase'</span><span class="hl-1">, </span><span class="hl-8">// constant</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'an example'</span><span class="hl-1">, </span><span class="hl-8">// the phrase contained in the quote</span><br/><span class="hl-1"> </span><span class="hl-7">quote</span><span class="hl-1">: </span><span class="hl-4">'"'</span><span class="hl-1"> </span><span class="hl-8">// the quote used to start and end this sequence</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
<li><p><strong>Group:</strong> <code>(one two three)</code></p>
|
||||
<p>A group can consist of one or more words or other types of values such as phrases or exclusions. A
|
||||
group logically puts its contents together, usually this is meant as an implicit OR operation but
|
||||
you can implement it as you require.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'group'</span><span class="hl-1">, </span><span class="hl-8">// constant</span><br/><span class="hl-1"> </span><span class="hl-7">children</span><span class="hl-1">: [</span><br/><span class="hl-1"> </span><span class="hl-8">// all types of children nodes such as word, phrase, etc</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'one'</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'two'</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">type:</span><span class="hl-1"> </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">value:</span><span class="hl-1"> </span><span class="hl-4">'three'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> ]</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
<li><p><strong>Logical operators <em>OR</em> and <em>AND</em>:</strong> <code>a OR b</code> or <code>a | b</code>, and <code>a AND b</code> or <code>a & b</code></p>
|
||||
<p>Logical operators group their immediate left and immediate right in a logical operation.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'operator'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'or'</span><span class="hl-1">, </span><span class="hl-8">// or: 'and'</span><br/><span class="hl-1"> </span><span class="hl-7">left</span><span class="hl-1">: { </span><span class="hl-8">// whatever is on the left of the operator - word, phrase, etc</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'a'</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-7">right</span><span class="hl-1">: { </span><span class="hl-8">// whatever is on the right of the operator - word, phrase, etc</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'b'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="md:to-do" class="tsd-anchor"></a><h3><a href="#md:to-do">To Do</a></h3><ul>
|
||||
<li><p><strong>Exclusion:</strong> <code>-example</code></p>
|
||||
<p>An exclusion is an indication to not include results using the given word, phrase or group.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'exclusion'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: { </span><span class="hl-8">// all types of children nodes such as word, phrase, etc</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'example'</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
<li><p><strong>Domain:</strong> <code>example-domain:example-token</code></p>
|
||||
<p>A domain prefix signals the following token to only refer to the prefixing domain. For example, a
|
||||
user could search <code>name:apple</code> to only search the word <code>apple</code> within the <code>name</code> property of the
|
||||
object being searched on.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'domain'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">domain</span><span class="hl-1">: </span><span class="hl-4">'example-domain'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: { </span><span class="hl-8">// all types of children nodes such as word, phrase, etc</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'word'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'example-token'</span><span class="hl-1">,</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
<li><p><strong>User:</strong> <code>@example-user</code></p>
|
||||
<p>A user query can signal only searching content from a specific user.</p>
|
||||
<p><strong>Object:</strong></p>
|
||||
<pre><code class="language-js"><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-7">type</span><span class="hl-1">: </span><span class="hl-4">'user'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">value</span><span class="hl-1">: </span><span class="hl-4">'example-user'</span><span class="hl-1">,</span><br/><span class="hl-1">}</span>
|
||||
</code><button>Copy</button></pre>
|
||||
</li>
|
||||
</ul>
|
||||
</div></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:example-results"><span>Example results</span></a></li>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:how-to-use"><span>How to use</span></a></li>
|
||||
<li><a href="#md:supported-operators"><span>Supported operators</span></a></li>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:implemented"><span>Implemented</span></a></li>
|
||||
<li><a href="#md:to-do"><span>To <wbr/>Do</span></a></li></ul></li></ul></li></ul></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
107
docs/interfaces/Group.html
Normal file
107
docs/interfaces/Group.html
Normal file
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Group | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="Group.html">Group</a></li></ul>
|
||||
<h1>Interface Group</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Represents a token in the parser.</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="ParserTokenValue.html" class="tsd-signature-type tsd-kind-interface">ParserTokenValue</a>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Group</span></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L50">parser.ts:50</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Group.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>type</span></a>
|
||||
<a href="Group.html#children" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>children</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"group"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The type of token.</p>
|
||||
|
||||
<h3>See</h3><ul>
|
||||
<li><a href="Word.html" class="tsd-kind-interface">Word</a></li>
|
||||
<li><a href="Operator.html" class="tsd-kind-interface">Operator</a></li>
|
||||
<li><a href="Phrase.html" class="tsd-kind-interface">Phrase</a></li>
|
||||
<li><a href="Group.html" class="tsd-kind-interface">Group</a></li>
|
||||
</ul>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Overrides <a href="ParserTokenValue.html">ParserTokenValue</a>.<a href="ParserTokenValue.html#type">type</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L51">parser.ts:51</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="children" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>children</span><a href="#children" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">children</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The value of the group (the tokens inside).</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L53">parser.ts:53</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#type" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>type</span></a></li>
|
||||
<li><a href="#children" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>children</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="Group.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
97
docs/interfaces/LexerTokenValue.html
Normal file
97
docs/interfaces/LexerTokenValue.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LexerTokenValue | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="LexerTokenValue.html">LexerTokenValue</a></li></ul>
|
||||
<h1>Interface LexerTokenValue</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>A token value</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">LexerTokenValue</span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L26">lexer.ts:26</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="LexerTokenValue.html#value" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>value</span></a>
|
||||
<a href="LexerTokenValue.html#token" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>token</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="value" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The value of the token</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L28">lexer.ts:28</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="token" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>token</span><a href="#token" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">token</span><span class="tsd-signature-symbol">:</span> <a href="../enums/LexerToken.html" class="tsd-signature-type tsd-kind-enum">LexerToken</a></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The type of the token</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/lexer.ts#L30">lexer.ts:30</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#value" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a></li>
|
||||
<li><a href="#token" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>token</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="LexerTokenValue.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
126
docs/interfaces/Operator.html
Normal file
126
docs/interfaces/Operator.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Operator | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="Operator.html">Operator</a></li></ul>
|
||||
<h1>Interface Operator</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Represents a token in the parser.</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="ParserTokenValue.html" class="tsd-signature-type tsd-kind-interface">ParserTokenValue</a>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Operator</span></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L36">parser.ts:36</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Operator.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>type</span></a>
|
||||
<a href="Operator.html#value" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a>
|
||||
<a href="Operator.html#left" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>left</span></a>
|
||||
<a href="Operator.html#right" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>right</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"operator"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The type of token.</p>
|
||||
|
||||
<h3>See</h3><ul>
|
||||
<li><a href="Word.html" class="tsd-kind-interface">Word</a></li>
|
||||
<li><a href="Operator.html" class="tsd-kind-interface">Operator</a></li>
|
||||
<li><a href="Phrase.html" class="tsd-kind-interface">Phrase</a></li>
|
||||
<li><a href="Group.html" class="tsd-kind-interface">Group</a></li>
|
||||
</ul>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Overrides <a href="ParserTokenValue.html">ParserTokenValue</a>.<a href="ParserTokenValue.html#type">type</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L37">parser.ts:37</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="value" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The value of the operator.</p>
|
||||
<p>Can be <code>AND</code> or <code>OR</code>.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L43">parser.ts:43</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="left" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>left</span><a href="#left" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">left</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The left-hand side of the operator.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L45">parser.ts:45</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="right" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>right</span><a href="#right" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">right</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The right-hand side of the operator.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L47">parser.ts:47</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#type" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>type</span></a></li>
|
||||
<li><a href="#value" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a></li>
|
||||
<li><a href="#left" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>left</span></a></li>
|
||||
<li><a href="#right" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>right</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="Operator.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
100
docs/interfaces/ParserTokenValue.html
Normal file
100
docs/interfaces/ParserTokenValue.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ParserTokenValue | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="ParserTokenValue.html">ParserTokenValue</a></li></ul>
|
||||
<h1>Interface ParserTokenValue</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Represents a token in the parser.</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">ParserTokenValue</span>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="Phrase.html" class="tsd-signature-type tsd-kind-interface">Phrase</a></li>
|
||||
<li><a href="Word.html" class="tsd-signature-type tsd-kind-interface">Word</a></li>
|
||||
<li><a href="Operator.html" class="tsd-signature-type tsd-kind-interface">Operator</a></li>
|
||||
<li><a href="Group.html" class="tsd-signature-type tsd-kind-interface">Group</a></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L6">parser.ts:6</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="ParserTokenValue.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>type</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"word"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"operator"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"phrase"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"group"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The type of token.</p>
|
||||
|
||||
<h3>See</h3><ul>
|
||||
<li><a href="Word.html" class="tsd-kind-interface">Word</a></li>
|
||||
<li><a href="Operator.html" class="tsd-kind-interface">Operator</a></li>
|
||||
<li><a href="Phrase.html" class="tsd-kind-interface">Phrase</a></li>
|
||||
<li><a href="Group.html" class="tsd-kind-interface">Group</a></li>
|
||||
</ul>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L15">parser.ts:15</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#type" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>type</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="ParserTokenValue.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
116
docs/interfaces/Phrase.html
Normal file
116
docs/interfaces/Phrase.html
Normal file
@@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Phrase | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="Phrase.html">Phrase</a></li></ul>
|
||||
<h1>Interface Phrase</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Represents a phrase token in the parser.</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="ParserTokenValue.html" class="tsd-signature-type tsd-kind-interface">ParserTokenValue</a>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Phrase</span></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L22">parser.ts:22</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Phrase.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>type</span></a>
|
||||
<a href="Phrase.html#value" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a>
|
||||
<a href="Phrase.html#quote" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>quote</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"phrase"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The type of token.</p>
|
||||
|
||||
<h3>See</h3><ul>
|
||||
<li><a href="Word.html" class="tsd-kind-interface">Word</a></li>
|
||||
<li><a href="Operator.html" class="tsd-kind-interface">Operator</a></li>
|
||||
<li><a href="Phrase.html" class="tsd-kind-interface">Phrase</a></li>
|
||||
<li><a href="Group.html" class="tsd-kind-interface">Group</a></li>
|
||||
</ul>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Overrides <a href="ParserTokenValue.html">ParserTokenValue</a>.<a href="ParserTokenValue.html#type">type</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L23">parser.ts:23</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="value" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The value of the phrase.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L25">parser.ts:25</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="quote" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>quote</span><a href="#quote" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">quote</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"'"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"\""</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The quote character used to quote the phrase.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L27">parser.ts:27</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#type" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>type</span></a></li>
|
||||
<li><a href="#value" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a></li>
|
||||
<li><a href="#quote" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>quote</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="Phrase.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
107
docs/interfaces/Word.html
Normal file
107
docs/interfaces/Word.html
Normal file
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Word | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="Word.html">Word</a></li></ul>
|
||||
<h1>Interface Word</h1></div>
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography"><p>Represents a token in the parser.</p>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><a href="ParserTokenValue.html" class="tsd-signature-type tsd-kind-interface">ParserTokenValue</a>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Word</span></li></ul></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L30">parser.ts:30</a></li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Word.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>type</span></a>
|
||||
<a href="Word.html#value" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"word"</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The type of token.</p>
|
||||
|
||||
<h3>See</h3><ul>
|
||||
<li><a href="Word.html" class="tsd-kind-interface">Word</a></li>
|
||||
<li><a href="Operator.html" class="tsd-kind-interface">Operator</a></li>
|
||||
<li><a href="Phrase.html" class="tsd-kind-interface">Phrase</a></li>
|
||||
<li><a href="Group.html" class="tsd-kind-interface">Group</a></li>
|
||||
</ul>
|
||||
</div><aside class="tsd-sources">
|
||||
<p>Overrides <a href="ParserTokenValue.html">ParserTokenValue</a>.<a href="ParserTokenValue.html#type">type</a></p>
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L31">parser.ts:31</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="value" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>The value of the word.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L33">parser.ts:33</a></li></ul></aside></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#type" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>type</span></a></li>
|
||||
<li><a href="#value" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>value</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="Word.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="../types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
91
docs/modules.html
Normal file
91
docs/modules.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><link rel="stylesheet" href="assets/custom.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base=".">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<h2>search-parse - v0.1.0</h2></div>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Enumerations</h3>
|
||||
<div class="tsd-index-list"><a href="enums/ParserState.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a>
|
||||
<a href="enums/LexerState.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a>
|
||||
<a href="enums/LexerToken.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Classes</h3>
|
||||
<div class="tsd-index-list"><a href="classes/IParser.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a>
|
||||
<a href="classes/Parser.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a>
|
||||
<a href="classes/ILexer.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a>
|
||||
<a href="classes/Lexer.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a>
|
||||
<a href="classes/InputReader.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a>
|
||||
<a href="classes/BufferReader.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a>
|
||||
<a href="classes/StringReader.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Interfaces</h3>
|
||||
<div class="tsd-index-list"><a href="interfaces/ParserTokenValue.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a>
|
||||
<a href="interfaces/Phrase.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a>
|
||||
<a href="interfaces/Word.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a>
|
||||
<a href="interfaces/Operator.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a>
|
||||
<a href="interfaces/Group.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a>
|
||||
<a href="interfaces/LexerTokenValue.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Type Aliases</h3>
|
||||
<div class="tsd-index-list"><a href="types/ParserToken.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Functions</h3>
|
||||
<div class="tsd-index-list"><a href="functions/parse.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a>
|
||||
<a href="functions/filter.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a>
|
||||
<a href="functions/checkItem.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a>
|
||||
</div></section></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>parse</span></a></li>
|
||||
<li><a href="functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="types/ParserToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>IParser</span></a></li>
|
||||
<li><a href="enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
61
docs/types/ParserToken.html
Normal file
61
docs/types/ParserToken.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ParserToken | search-parse - v0.1.0</title><meta name="description" content="Documentation for search-parse"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">search-parse - v0.1.0</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">search-parse</a></li>
|
||||
<li><a href="ParserToken.html">ParserToken</a></li></ul>
|
||||
<h1>Type alias ParserToken</h1></div>
|
||||
<div class="tsd-signature"><span class="tsd-kind-type-alias">Parser<wbr/>Token</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/Phrase.html" class="tsd-signature-type tsd-kind-interface">Phrase</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Word.html" class="tsd-signature-type tsd-kind-interface">Word</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Operator.html" class="tsd-signature-type tsd-kind-interface">Operator</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Group.html" class="tsd-signature-type tsd-kind-interface">Group</a></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Represents a token in the parser.</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/chenasraf/search-ast-parser-js/blob/bfc4edd/src/parser.ts#L59">parser.ts:59</a></li></ul></aside></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>search-<wbr/>parse -<wbr/> v0.1.0</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="../functions/parse.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg><span>parse</span></a></li>
|
||||
<li><a href="../functions/filter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>filter</span></a></li>
|
||||
<li><a href="../functions/checkItem.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg><span>check<wbr/>Item</span></a></li>
|
||||
<li><a href="../interfaces/ParserTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Parser<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../interfaces/Phrase.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Phrase</span></a></li>
|
||||
<li><a href="../interfaces/Word.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Word</span></a></li>
|
||||
<li><a href="../interfaces/Operator.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Operator</span></a></li>
|
||||
<li><a href="../interfaces/Group.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Group</span></a></li>
|
||||
<li><a href="ParserToken.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Parser<wbr/>Token</span></a></li>
|
||||
<li><a href="../classes/IParser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>IParser</span></a></li>
|
||||
<li><a href="../enums/ParserState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg><span>Parser<wbr/>State</span></a></li>
|
||||
<li><a href="../classes/Parser.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Parser</span></a></li>
|
||||
<li><a href="../enums/LexerState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>State</span></a></li>
|
||||
<li><a href="../enums/LexerToken.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg><span>Lexer<wbr/>Token</span></a></li>
|
||||
<li><a href="../interfaces/LexerTokenValue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Lexer<wbr/>Token<wbr/>Value</span></a></li>
|
||||
<li><a href="../classes/ILexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>ILexer</span></a></li>
|
||||
<li><a href="../classes/Lexer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Lexer</span></a></li>
|
||||
<li><a href="../classes/InputReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Input<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/BufferReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Buffer<wbr/>Reader</span></a></li>
|
||||
<li><a href="../classes/StringReader.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>String<wbr/>Reader</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
@@ -23,11 +23,14 @@
|
||||
"jest": "^28.1.3",
|
||||
"ts-jest": "^28.0.7",
|
||||
"ts-node": "^10.9.1",
|
||||
"typedoc": "^0.24.6",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"build": "tsc && yarn copy-files && yarn package",
|
||||
"build-example": "tsc -p ./tsconfig.example.json && yarn copy-files && yarn package",
|
||||
"build-docs": "typedoc",
|
||||
"copy-files": "cp README.md LICENSE build/",
|
||||
"package": "jq 'del(.scripts, .devDependencies)' < package.json > build/package.json"
|
||||
}
|
||||
|
||||
76
release.config.js
Normal file
76
release.config.js
Normal file
@@ -0,0 +1,76 @@
|
||||
const releaseRules = [
|
||||
{ type: "feat", section: "Features", release: "minor" },
|
||||
{ type: "docs", section: "Build", release: false },
|
||||
{ type: "fix", section: "Bug Fixes", release: "patch" },
|
||||
{ type: "refactor", section: "Misc", release: "patch" },
|
||||
{ type: "perf", section: "Misc", release: "patch" },
|
||||
{ type: "build", section: "Build", release: "patch" },
|
||||
{ type: "chore", section: "Misc", release: "patch" },
|
||||
{ type: "test", section: "Tests", release: "patch" },
|
||||
]
|
||||
|
||||
/** @type {import('semantic-release').Options} */
|
||||
module.exports = {
|
||||
branches: [
|
||||
"+([0-9])?(.{+([0-9]),x}).x",
|
||||
"master",
|
||||
"next",
|
||||
"next-major",
|
||||
{ name: "develop", prerelease: true },
|
||||
{ name: "beta", prerelease: true },
|
||||
{ name: "alpha", prerelease: true },
|
||||
],
|
||||
analyzeCommits: {
|
||||
path: "semantic-release-conventional-commits",
|
||||
majorTypes: ["major", "breaking"],
|
||||
minorTypes: ["minor", "feat", "feature"],
|
||||
patchTypes: ["patch", "fix", "bugfix", "refactor", "perf", "revert"],
|
||||
},
|
||||
plugins: [
|
||||
[
|
||||
"@semantic-release/commit-analyzer",
|
||||
{
|
||||
preset: "conventionalcommits",
|
||||
parserOpts: {
|
||||
noteKeywords: ["breaking:", "breaking-fix:", "breaking-feat:"],
|
||||
},
|
||||
releaseRules: releaseRules,
|
||||
},
|
||||
],
|
||||
[
|
||||
"@semantic-release/release-notes-generator",
|
||||
{
|
||||
preset: "conventionalcommits",
|
||||
parserOpts: {
|
||||
noteKeywords: ["breaking"],
|
||||
types: releaseRules,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
"@semantic-release/changelog",
|
||||
{
|
||||
changelogFile: "CHANGELOG.md",
|
||||
changelogTitle: "# Change Log",
|
||||
},
|
||||
],
|
||||
[
|
||||
"@semantic-release/npm",
|
||||
{
|
||||
pkgRoot: "dist",
|
||||
},
|
||||
],
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
assets: ["CHANGELOG.md", "package.json"],
|
||||
},
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
assets: ["package.tgz"],
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
57
src/docs.css
Normal file
57
src/docs.css
Normal file
@@ -0,0 +1,57 @@
|
||||
.tsd-typography table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tsd-typography table td,
|
||||
.tsd-typography table th {
|
||||
vertical-align: top;
|
||||
border: 1px solid var(--color-accent);
|
||||
padding: 6px;
|
||||
}
|
||||
.tsd-typography h1 + pre,
|
||||
.tsd-typography h2 + pre,
|
||||
.tsd-typography h3 + pre,
|
||||
.tsd-typography h4 + pre,
|
||||
.tsd-typography h5 + pre,
|
||||
.tsd-typography h6 + pre,
|
||||
/* */
|
||||
.tsd-typography h1 + table,
|
||||
.tsd-typography h2 + table,
|
||||
.tsd-typography h3 + table,
|
||||
.tsd-typography h4 + table,
|
||||
.tsd-typography h5 + table,
|
||||
.tsd-typography h6 + table {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.tsd-typography pre + a + h1,
|
||||
.tsd-typography pre + a + h2,
|
||||
.tsd-typography pre + a + h3,
|
||||
.tsd-typography pre + a + h4,
|
||||
.tsd-typography pre + a + h5,
|
||||
.tsd-typography pre + a + h6,
|
||||
/* */
|
||||
.tsd-typography table + a + h1,
|
||||
.tsd-typography table + a + h2,
|
||||
.tsd-typography table + a + h3,
|
||||
.tsd-typography table + a + h4,
|
||||
.tsd-typography table + a + h5,
|
||||
.tsd-typography table + a + h6 {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
/*
|
||||
.tsd-index-accordion[data-key*="Configuration."] ul.tsd-nested-navigation,
|
||||
.tsd-index-accordion[data-key*="Configuration."] .tsd-accordion-summary > svg,
|
||||
.tsd-index-accordion[data-key="Changelog"] ul.tsd-nested-navigation,
|
||||
.tsd-index-accordion[data-key="Changelog"] .tsd-accordion-summary > svg,
|
||||
.tsd-index-accordion[data-key="Configuration"] li:nth-child(n + 6) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tsd-index-accordion[data-key*="Configuration."],
|
||||
.tsd-index-accordion[data-key="Changelog"] {
|
||||
margin-left: 0;
|
||||
}
|
||||
*/
|
||||
61
src/example.ts
Normal file
61
src/example.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { parse } from './index'
|
||||
import { ParserToken } from './parser'
|
||||
|
||||
const item = [
|
||||
'apple banana orange lemon',
|
||||
'apple banana orange',
|
||||
'apple banana',
|
||||
'apple',
|
||||
'banana orange lemon',
|
||||
'banana orange',
|
||||
'banana',
|
||||
'orange lemon',
|
||||
'orange',
|
||||
]
|
||||
|
||||
function filter(parsed: ParserToken[], data: string[]): string[] {
|
||||
return data.filter((item) => {
|
||||
for (const check of parsed) {
|
||||
if (checkItem(check, item)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
function checkItem(check: ParserToken, item: string): boolean {
|
||||
item = String(item).toLowerCase()
|
||||
switch (check.type) {
|
||||
case 'word':
|
||||
return item.includes(check.value.toLowerCase())
|
||||
case 'operator':
|
||||
if (check.value.toUpperCase() === 'OR') {
|
||||
return checkItem(check.left, item) || checkItem(check.right, item)
|
||||
}
|
||||
if (check.value.toUpperCase() === 'AND') {
|
||||
return checkItem(check.left, item) && checkItem(check.right, item)
|
||||
}
|
||||
throw new Error(`Unknown operator: ${check.value}`)
|
||||
case 'group':
|
||||
return filter(check.children, [item]).length > 0
|
||||
case 'phrase':
|
||||
return item.includes(check.value.toLowerCase())
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
const query = '(apple OR banana) AND (orange OR lemon)'
|
||||
const result = parse(query)
|
||||
console.log('query:', query)
|
||||
console.log('parser result:', JSON.stringify(result, undefined, 2))
|
||||
console.log('search result:', filter(result, item))
|
||||
|
||||
const query2 = '(apple OR banana AND (orange OR lemon'
|
||||
const result2 = parse(query2)
|
||||
console.log('query:', query2)
|
||||
console.log('parser result:', JSON.stringify(result2, undefined, 2))
|
||||
console.log('search result:', filter(result2, item))
|
||||
}
|
||||
|
||||
main()
|
||||
18
src/index.ts
18
src/index.ts
@@ -2,6 +2,24 @@ import { Lexer } from './lexer'
|
||||
import { Parser, ParserToken } from './parser'
|
||||
import { StringReader } from './reader'
|
||||
|
||||
export * from './utils'
|
||||
export * from './parser'
|
||||
export * from './lexer'
|
||||
export * from './reader'
|
||||
// export * from './error_handler'
|
||||
|
||||
/**
|
||||
* Parse a search string into a list of tokens.
|
||||
* @param search The search string to parse.
|
||||
* @returns A list of tokens.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* import { parse } from 'search-lexer'
|
||||
* const tokens = parse('foo OR bar')
|
||||
* console.log(tokens)
|
||||
* ```
|
||||
*/
|
||||
export function parse(search: string): ParserToken[] {
|
||||
const reader = new StringReader(search)
|
||||
const lexer = new Lexer(reader)
|
||||
|
||||
106
src/lexer.ts
106
src/lexer.ts
@@ -1,57 +1,79 @@
|
||||
import { InputReader } from './reader'
|
||||
|
||||
export enum lexerState {
|
||||
/** The state of the lexer */
|
||||
export enum LexerState {
|
||||
/** Default state, reading words */
|
||||
default,
|
||||
/** In phrase mode, reading characters until quote terminator */
|
||||
inPhrase,
|
||||
}
|
||||
|
||||
/** The type of token */
|
||||
export enum LexerToken {
|
||||
/** A group token, either ( or ) */
|
||||
group = 'group',
|
||||
/** An operator token, either and, or, | or & (case-insensitive) */
|
||||
operator = 'operator',
|
||||
/** A word token, a sequence of alphanumeric characters */
|
||||
word = 'word',
|
||||
/** A quote token, either ' or " */
|
||||
quote = 'quote',
|
||||
/** A whitespace token, a sequence of whitespace characters */
|
||||
whitespace = 'whitespace',
|
||||
}
|
||||
|
||||
/** A token value */
|
||||
export interface LexerTokenValue {
|
||||
/** The value of the token */
|
||||
value: string
|
||||
/** The type of the token */
|
||||
token: LexerToken
|
||||
}
|
||||
|
||||
/** A lexer interface */
|
||||
export abstract class ILexer {
|
||||
/** Peek at the next {n} token(s) */
|
||||
public abstract peek(amount?: number): LexerTokenValue | null
|
||||
/** Consume the next {n} token(s) */
|
||||
public abstract consume(amount?: number): LexerTokenValue | null
|
||||
/** Check if the lexer is at the end of the input */
|
||||
public abstract isEOF(): boolean
|
||||
/** Parse the input into tokens */
|
||||
public abstract parse(): LexerTokenValue[]
|
||||
public abstract index: number
|
||||
/** Set the index of the lexer */
|
||||
public abstract setIndex(n: number): void
|
||||
/** Set the index of the lexer */
|
||||
public abstract index: number
|
||||
/** The index of the next token */
|
||||
public peekIndex: number = 0
|
||||
}
|
||||
|
||||
/** The default lexer */
|
||||
export class Lexer implements ILexer {
|
||||
reader: InputReader<string>
|
||||
state: lexerState = lexerState.default
|
||||
quoteTerminator: string | null = null
|
||||
index: number = 0
|
||||
peekIndex: number = 0
|
||||
afterWhitespace: boolean = false
|
||||
cache: LexerTokenValue[] = []
|
||||
#reader: InputReader<string>
|
||||
#state: LexerState = LexerState.default
|
||||
#quoteTerminator: string | null = null
|
||||
public index: number = 0
|
||||
public peekIndex: number = 0
|
||||
#afterWhitespace: boolean = false
|
||||
#cache: LexerTokenValue[] = []
|
||||
|
||||
constructor(reader: InputReader<string>) {
|
||||
this.reader = reader
|
||||
this.#reader = reader
|
||||
}
|
||||
|
||||
public peek(amount = 0): LexerTokenValue | null {
|
||||
const cacheIndex = this.index + amount
|
||||
|
||||
if (this.cache[cacheIndex]) {
|
||||
return this.cache[cacheIndex]
|
||||
if (this.#cache[cacheIndex]) {
|
||||
return this.#cache[cacheIndex]
|
||||
}
|
||||
if (this.isEOF()) {
|
||||
return null
|
||||
}
|
||||
|
||||
this.fillCache(cacheIndex)
|
||||
const token = this.cache[cacheIndex]
|
||||
const token = this.#cache[cacheIndex]
|
||||
|
||||
return token
|
||||
}
|
||||
@@ -60,15 +82,15 @@ export class Lexer implements ILexer {
|
||||
const cacheIndex = this.index + amount
|
||||
this.index = cacheIndex + 1
|
||||
|
||||
if (this.cache[cacheIndex]) {
|
||||
return this.cache[cacheIndex]
|
||||
if (this.#cache[cacheIndex]) {
|
||||
return this.#cache[cacheIndex]
|
||||
}
|
||||
if (this.isEOF()) {
|
||||
return null
|
||||
}
|
||||
|
||||
this.fillCache(cacheIndex)
|
||||
const token = this.cache[cacheIndex]
|
||||
const token = this.#cache[cacheIndex]
|
||||
return token
|
||||
}
|
||||
|
||||
@@ -79,11 +101,11 @@ export class Lexer implements ILexer {
|
||||
if (this.isEOF()) {
|
||||
return
|
||||
}
|
||||
if (this.cache[i]) {
|
||||
if (this.#cache[i]) {
|
||||
continue
|
||||
}
|
||||
const value = this.readNextToken()
|
||||
this.cache[i] = value!
|
||||
this.#cache[i] = value!
|
||||
}
|
||||
this.index = index
|
||||
}
|
||||
@@ -101,13 +123,13 @@ export class Lexer implements ILexer {
|
||||
}
|
||||
|
||||
public isEOF(): boolean {
|
||||
return this.reader.isEOF()
|
||||
return this.#reader.isEOF()
|
||||
}
|
||||
|
||||
private readNextToken(): LexerTokenValue | null {
|
||||
const nextChar = this.reader.peek()
|
||||
switch (this.state) {
|
||||
case lexerState.default:
|
||||
const nextChar = this.#reader.peek()
|
||||
switch (this.#state) {
|
||||
case LexerState.default:
|
||||
// whitespace
|
||||
if (this.isWhitespace(nextChar)) {
|
||||
return this.consumeWhitespace()
|
||||
@@ -115,19 +137,19 @@ export class Lexer implements ILexer {
|
||||
|
||||
// quote
|
||||
if (`"'`.includes(nextChar)) {
|
||||
this.state = lexerState.inPhrase
|
||||
this.quoteTerminator = nextChar
|
||||
this.#state = LexerState.inPhrase
|
||||
this.#quoteTerminator = nextChar
|
||||
return this.consumeQuote()
|
||||
}
|
||||
|
||||
// other words
|
||||
if (this.isAlphanumeric(nextChar)) {
|
||||
// guard OR
|
||||
if (this.afterWhitespace && this.peekExact('OR')) {
|
||||
if (this.#afterWhitespace && this.peekExact('OR')) {
|
||||
return this.consumeOr()
|
||||
}
|
||||
// guard AND
|
||||
if (this.afterWhitespace && this.peekExact('AND')) {
|
||||
if (this.#afterWhitespace && this.peekExact('AND')) {
|
||||
return this.consumeAnd()
|
||||
}
|
||||
|
||||
@@ -152,12 +174,12 @@ export class Lexer implements ILexer {
|
||||
|
||||
// other, consider as whitespace
|
||||
return this.consumeWhitespace()
|
||||
case lexerState.inPhrase:
|
||||
this.afterWhitespace = false
|
||||
case LexerState.inPhrase:
|
||||
this.#afterWhitespace = false
|
||||
|
||||
// in phrase mode, consume until quote terminator
|
||||
if (nextChar === this.quoteTerminator) {
|
||||
this.state = lexerState.default
|
||||
if (nextChar === this.#quoteTerminator) {
|
||||
this.#state = LexerState.default
|
||||
return this.consumeQuote()
|
||||
}
|
||||
|
||||
@@ -169,16 +191,16 @@ export class Lexer implements ILexer {
|
||||
}
|
||||
|
||||
private consumeWhitespace() {
|
||||
this.afterWhitespace = true
|
||||
this.#afterWhitespace = true
|
||||
return {
|
||||
value: this.reader.consume(),
|
||||
value: this.#reader.consume(),
|
||||
token: LexerToken.whitespace,
|
||||
}
|
||||
}
|
||||
|
||||
private consumeQuote(): LexerTokenValue {
|
||||
return {
|
||||
value: this.reader.consume(),
|
||||
value: this.#reader.consume(),
|
||||
token: LexerToken.quote,
|
||||
}
|
||||
}
|
||||
@@ -214,12 +236,12 @@ export class Lexer implements ILexer {
|
||||
}
|
||||
|
||||
private peekExact(word: string) {
|
||||
let nextChar = this.reader.peek()
|
||||
let nextChar = this.#reader.peek()
|
||||
for (let i = 0; i < word.length; i++) {
|
||||
if (nextChar !== word[i]) {
|
||||
return false
|
||||
}
|
||||
nextChar = this.reader.peek(i + 1)
|
||||
nextChar = this.#reader.peek(i + 1)
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -234,22 +256,22 @@ export class Lexer implements ILexer {
|
||||
|
||||
private consumeLength(times = 1) {
|
||||
for (let i = 0; i < times; i++) {
|
||||
this.reader.consume()
|
||||
this.#reader.consume()
|
||||
}
|
||||
}
|
||||
|
||||
private consumeGroup(): LexerTokenValue {
|
||||
return {
|
||||
value: this.reader.consume(),
|
||||
value: this.#reader.consume(),
|
||||
token: LexerToken.group,
|
||||
}
|
||||
}
|
||||
|
||||
private consumePhrase(): LexerTokenValue {
|
||||
let nextChar = this.reader.consume()
|
||||
let nextChar = this.#reader.consume()
|
||||
let value = nextChar
|
||||
while ((nextChar = this.reader.peek()) && nextChar !== this.quoteTerminator) {
|
||||
value += this.reader.consume()
|
||||
while ((nextChar = this.#reader.peek()) && nextChar !== this.#quoteTerminator) {
|
||||
value += this.#reader.consume()
|
||||
}
|
||||
return {
|
||||
value,
|
||||
@@ -267,8 +289,8 @@ export class Lexer implements ILexer {
|
||||
|
||||
private consumeWholeWord() {
|
||||
let value = ''
|
||||
while (this.isAlphanumeric(this.reader.peek())) {
|
||||
value += this.reader.consume()
|
||||
while (this.isAlphanumeric(this.#reader.peek())) {
|
||||
value += this.#reader.consume()
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
125
src/parser.ts
125
src/parser.ts
@@ -1,73 +1,115 @@
|
||||
import { InputReader } from './reader'
|
||||
import { ILexer, LexerToken, LexerTokenValue } from './lexer'
|
||||
|
||||
/**
|
||||
* Represents a token in the parser.
|
||||
*/
|
||||
export interface ParserTokenValue {
|
||||
/**
|
||||
* The type of token.
|
||||
*
|
||||
* @see {@link Word}
|
||||
* @see {@link Operator}
|
||||
* @see {@link Phrase}
|
||||
* @see {@link Group}
|
||||
*/
|
||||
type: 'word' | 'operator' | 'phrase' | 'group'
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a phrase token in the parser.
|
||||
* @extends ParserTokenValue
|
||||
*/
|
||||
export interface Phrase extends ParserTokenValue {
|
||||
type: 'phrase'
|
||||
/** The value of the phrase. */
|
||||
value: string
|
||||
/** The quote character used to quote the phrase. */
|
||||
quote: "'" | '"'
|
||||
}
|
||||
|
||||
export interface Word extends ParserTokenValue {
|
||||
type: 'word'
|
||||
/** The value of the word. */
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface Operator extends ParserTokenValue {
|
||||
type: 'operator'
|
||||
/**
|
||||
* The value of the operator.
|
||||
*
|
||||
* Can be `AND` or `OR`.
|
||||
*/
|
||||
value: string
|
||||
/** The left-hand side of the operator. */
|
||||
left: any
|
||||
/** The right-hand side of the operator. */
|
||||
right: any
|
||||
}
|
||||
|
||||
export interface Group extends ParserTokenValue {
|
||||
type: 'group'
|
||||
/** The value of the group (the tokens inside). */
|
||||
children: any[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a token in the parser.
|
||||
*/
|
||||
export type ParserToken = Phrase | Word | Operator | Group
|
||||
|
||||
/**
|
||||
* Parser abstract class
|
||||
*
|
||||
* @see {@link Parser}
|
||||
* @abstract
|
||||
*/
|
||||
export abstract class IParser {
|
||||
/** The lexer to use for parsing. */
|
||||
public lexer: ILexer
|
||||
/** The current index of the parser. */
|
||||
public abstract index: number
|
||||
|
||||
constructor(lexer: ILexer) {
|
||||
this.lexer = lexer
|
||||
}
|
||||
|
||||
/** Peeks at the next {n} token(s). */
|
||||
public abstract peek(amount?: number): ParserToken | null
|
||||
/** Consumes the next {n} token(s). */
|
||||
public abstract consume(amount?: number): ParserToken | null
|
||||
/** Parses the tokens. */
|
||||
public abstract parse(): ParserToken[]
|
||||
/** Checks if the parser is at the end of the input. */
|
||||
public abstract isEOF(): boolean
|
||||
}
|
||||
|
||||
/** The state of the parser. */
|
||||
export enum ParserState {
|
||||
/** The default state. */
|
||||
default,
|
||||
}
|
||||
|
||||
export class Parser extends IParser {
|
||||
index = 0
|
||||
state = ParserState.default
|
||||
cache: ParserToken[] = []
|
||||
public index = 0
|
||||
#state = ParserState.default
|
||||
#cache: ParserToken[] = []
|
||||
|
||||
constructor(lexer: ILexer) {
|
||||
super(lexer)
|
||||
this.state = ParserState.default
|
||||
this.#state = ParserState.default
|
||||
}
|
||||
|
||||
public peek(amount = 0): ParserToken | null {
|
||||
const cacheIndex = this.index + amount
|
||||
if (cacheIndex < this.cache.length) {
|
||||
return this.cache[cacheIndex]
|
||||
if (cacheIndex < this.#cache.length) {
|
||||
return this.#cache[cacheIndex]
|
||||
}
|
||||
if (this.isEOF()) {
|
||||
return null
|
||||
}
|
||||
this.fillCache(cacheIndex)
|
||||
const token = this.cache[cacheIndex]
|
||||
this.#fillCache(cacheIndex)
|
||||
const token = this.#cache[cacheIndex]
|
||||
return token
|
||||
}
|
||||
|
||||
@@ -75,30 +117,30 @@ export class Parser extends IParser {
|
||||
const cacheIndex = this.index + amount
|
||||
this.index = cacheIndex + 1
|
||||
|
||||
if (this.cache[cacheIndex]) {
|
||||
return this.cache[cacheIndex]
|
||||
if (this.#cache[cacheIndex]) {
|
||||
return this.#cache[cacheIndex]
|
||||
}
|
||||
if (this.isEOF()) {
|
||||
return null
|
||||
}
|
||||
|
||||
this.fillCache(cacheIndex)
|
||||
const token = this.cache[cacheIndex]
|
||||
this.#fillCache(cacheIndex)
|
||||
const token = this.#cache[cacheIndex]
|
||||
return token
|
||||
}
|
||||
|
||||
private fillCache(n: number) {
|
||||
#fillCache(n: number) {
|
||||
const { index } = this
|
||||
for (let i = 0; i <= n; i++) {
|
||||
this.index = i
|
||||
if (this.isEOF()) {
|
||||
return
|
||||
}
|
||||
if (this.cache[i]) {
|
||||
if (this.#cache[i]) {
|
||||
continue
|
||||
}
|
||||
const value = this.readNextToken()
|
||||
this.cache[i] = value!
|
||||
const value = this.#readNextToken()
|
||||
this.#cache[i] = value!
|
||||
}
|
||||
this.index = index
|
||||
}
|
||||
@@ -122,49 +164,53 @@ export class Parser extends IParser {
|
||||
return this.lexer.isEOF()
|
||||
}
|
||||
|
||||
private readNextToken(): ParserToken | null {
|
||||
#readNextToken(): ParserToken | null {
|
||||
let token = this.lexer.peek()
|
||||
let nextToken = this.lexer.peek(1)
|
||||
|
||||
switch (this.state) {
|
||||
switch (this.#state) {
|
||||
case ParserState.default:
|
||||
if (token?.token === 'whitespace') {
|
||||
this.index++
|
||||
this.lexer.consume()
|
||||
return this.readNextToken()
|
||||
return this.#readNextToken()
|
||||
}
|
||||
nextToken = this.peekSkipWhitespace(nextToken)
|
||||
nextToken = this.#peekSkipWhitespace(nextToken)
|
||||
// lookahead
|
||||
switch (nextToken?.token) {
|
||||
case LexerToken.operator:
|
||||
// this.index++
|
||||
this.lexer.consume()
|
||||
const parsed = this.parseNormalLexToken(token!)!
|
||||
const nextParsed = this.readNextToken()!
|
||||
const parsed = this.#parseNormalLexToken(token!)!
|
||||
const nextParsed = this.#readNextToken()!
|
||||
this.index++
|
||||
this.lexer.consume()
|
||||
return this.consumeOperator(parsed, nextToken, nextParsed)
|
||||
return this.#consumeOperator(parsed, nextToken, nextParsed)
|
||||
case LexerToken.group:
|
||||
if (nextToken.value === ')') {
|
||||
return this.parseNormalLexToken(token)
|
||||
return this.#parseNormalLexToken(token)
|
||||
}
|
||||
if (token?.token == 'operator') {
|
||||
return this.consumeOperator(this.cache[this.index - 1], token, this.readNextToken()!)
|
||||
return this.#consumeOperator(
|
||||
this.#cache[this.index - 1],
|
||||
token,
|
||||
this.#readNextToken()!,
|
||||
)
|
||||
}
|
||||
this.index++
|
||||
this.lexer.consume()
|
||||
return this.consumeGroup(nextToken!)
|
||||
return this.#consumeGroup(nextToken!)
|
||||
}
|
||||
|
||||
// no special token coming up, proceed with this token
|
||||
this.lexer.consume()
|
||||
return this.parseNormalLexToken(token)
|
||||
return this.#parseNormalLexToken(token)
|
||||
default:
|
||||
throw new Error('Bad state')
|
||||
}
|
||||
}
|
||||
|
||||
private peekSkipWhitespace(nextToken: LexerTokenValue | null) {
|
||||
#peekSkipWhitespace(nextToken: LexerTokenValue | null) {
|
||||
while (nextToken && nextToken.token === 'whitespace') {
|
||||
this.lexer.consume()
|
||||
nextToken = this.lexer.peek()
|
||||
@@ -172,18 +218,18 @@ export class Parser extends IParser {
|
||||
return nextToken
|
||||
}
|
||||
|
||||
private parseNormalLexToken(token: LexerTokenValue | null): ParserToken | null {
|
||||
#parseNormalLexToken(token: LexerTokenValue | null): ParserToken | null {
|
||||
switch (token?.token) {
|
||||
case LexerToken.word:
|
||||
return this.consumeWord(token)
|
||||
return this.#consumeWord(token)
|
||||
case LexerToken.quote:
|
||||
// TODO might need to reconsider consuming here.
|
||||
const quoteContent = this.lexer.consume()!
|
||||
this.lexer.consume()
|
||||
return this.consumePhrase(token, quoteContent)
|
||||
return this.#consumePhrase(token, quoteContent)
|
||||
case LexerToken.group:
|
||||
// this.lexer.consume()
|
||||
return this.consumeGroup(token!)
|
||||
return this.#consumeGroup(token!)
|
||||
// case LexerToken.operator:
|
||||
// return this.consumeOperator(this.cache[this.index - 1], token, this.readNextToken())
|
||||
default:
|
||||
@@ -191,17 +237,17 @@ export class Parser extends IParser {
|
||||
}
|
||||
}
|
||||
|
||||
private consumeWord(word: LexerTokenValue): ParserToken | null {
|
||||
#consumeWord(word: LexerTokenValue): ParserToken | null {
|
||||
// TODO might need to reconsider consuming here.
|
||||
return { type: 'word', value: word.value }
|
||||
}
|
||||
|
||||
private consumePhrase(token: LexerTokenValue, quoteContent: LexerTokenValue): ParserToken | null {
|
||||
#consumePhrase(token: LexerTokenValue, quoteContent: LexerTokenValue): ParserToken | null {
|
||||
// TODO might need to reconsider consuming here.
|
||||
return { type: 'phrase', value: quoteContent.value, quote: token.value as '"' }
|
||||
}
|
||||
|
||||
private consumeOperator(
|
||||
#consumeOperator(
|
||||
left: ParserToken,
|
||||
opToken: LexerTokenValue,
|
||||
right: ParserToken,
|
||||
@@ -210,11 +256,12 @@ export class Parser extends IParser {
|
||||
return { type: 'operator', value: opToken.value, left, right }
|
||||
}
|
||||
|
||||
private consumeGroup(token: LexerTokenValue): ParserToken | null {
|
||||
// @ts-ignore no-unused-vars
|
||||
#consumeGroup(token: LexerTokenValue): ParserToken | null {
|
||||
const children: ParserToken[] = []
|
||||
let nextToken = this.peekSkipWhitespace(this.lexer.peek())
|
||||
let nextToken = this.#peekSkipWhitespace(this.lexer.peek())
|
||||
while (nextToken && nextToken?.value !== ')') {
|
||||
const child = this.readNextToken()
|
||||
const child = this.#readNextToken()
|
||||
if (child) {
|
||||
children.push(child)
|
||||
}
|
||||
|
||||
@@ -1,26 +1,37 @@
|
||||
/**
|
||||
* Abstract Input Reader
|
||||
*/
|
||||
export abstract class InputReader<T> {
|
||||
/** Peek at the next character in the input stream */
|
||||
public abstract peek(n?: number): T
|
||||
/** Consume the next character in the input stream */
|
||||
public abstract consume(n?: number): T
|
||||
/** Set the index of the input stream */
|
||||
public abstract setIndex(n: number): void
|
||||
/** Check if the input stream is at the end of the file */
|
||||
public abstract isEOF(): boolean
|
||||
/** The current index of the input stream */
|
||||
public index!: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Buffer Input Reader
|
||||
*/
|
||||
export class BufferReader implements InputReader<string> {
|
||||
private buffer: Buffer
|
||||
#buffer: Buffer
|
||||
public index: number
|
||||
|
||||
constructor(buffer: Buffer) {
|
||||
this.buffer = buffer
|
||||
this.#buffer = buffer
|
||||
this.index = 0
|
||||
}
|
||||
|
||||
public peek(n = 0): string {
|
||||
return this.buffer.subarray(this.index + n, 1).toString()
|
||||
return this.#buffer.subarray(this.index + n, 1).toString()
|
||||
}
|
||||
|
||||
public consume(n = 0): string {
|
||||
const result = this.buffer.subarray(this.index + n, 1).toString()
|
||||
const result = this.#buffer.subarray(this.index + n, 1).toString()
|
||||
this.index++
|
||||
return result
|
||||
}
|
||||
@@ -30,24 +41,27 @@ export class BufferReader implements InputReader<string> {
|
||||
}
|
||||
|
||||
public isEOF(): boolean {
|
||||
return this.index >= this.buffer.length
|
||||
return this.index >= this.#buffer.length
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* String Input Reader
|
||||
*/
|
||||
export class StringReader implements InputReader<string> {
|
||||
private string: string
|
||||
#string: string
|
||||
public index: number = 0
|
||||
|
||||
constructor(string: string) {
|
||||
this.string = string
|
||||
this.#string = string
|
||||
}
|
||||
|
||||
public peek(n = 0): string {
|
||||
return this.string.substring(this.index + n, this.index + n + 1)
|
||||
return this.#string.substring(this.index + n, this.index + n + 1)
|
||||
}
|
||||
|
||||
public consume(n = 0): string {
|
||||
const result = this.string.substring(this.index + n, this.index + n + 1)
|
||||
const result = this.#string.substring(this.index + n, this.index + n + 1)
|
||||
this.index++
|
||||
return result
|
||||
}
|
||||
@@ -57,6 +71,6 @@ export class StringReader implements InputReader<string> {
|
||||
}
|
||||
|
||||
public isEOF(): boolean {
|
||||
return this.index >= this.string.length
|
||||
return this.index >= this.#string.length
|
||||
}
|
||||
}
|
||||
|
||||
74
src/utils.ts
Normal file
74
src/utils.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
import { ParserToken } from './parser'
|
||||
|
||||
/**
|
||||
* Filter data based on parsed query
|
||||
*
|
||||
* @param parsed - parsed query
|
||||
* @param data - data to filter
|
||||
* @param map - map function to apply to data before filtering
|
||||
* @returns filtered data
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const data = ['Hello', 'World', 'Foo', 'Bar']
|
||||
* const parsed = parse('Hello OR (World AND Bar)')
|
||||
* const filtered = filter(parsed, data)
|
||||
* console.log(filtered) // ['Hello', 'World', 'Bar']
|
||||
* ```
|
||||
*/
|
||||
export function filter(
|
||||
parsed: ParserToken[],
|
||||
data: string[],
|
||||
map?: (item: string) => string,
|
||||
): string[]
|
||||
export function filter<T>(parsed: ParserToken[], data: T[], map: (item: T) => string): string[]
|
||||
export function filter<T = string>(
|
||||
parsed: ParserToken[],
|
||||
data: T[],
|
||||
map?: (item: T) => string,
|
||||
): T[] {
|
||||
return data.filter((_item) => {
|
||||
let item: string
|
||||
item = map?.(_item) ?? String(_item)
|
||||
for (const check of parsed) {
|
||||
if (checkItem(check, item)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if item matches a single token
|
||||
* @param check - token to check
|
||||
* @param item - item to check
|
||||
* @returns true if item matches token
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const check = parse('Hello OR (World AND Bar)')
|
||||
* const item = 'Hello'
|
||||
* const matches = checkItem(check, item)
|
||||
* console.log(matches) // true
|
||||
* ```
|
||||
*/
|
||||
export function checkItem(check: ParserToken, item: string): boolean {
|
||||
item = String(item).toLowerCase()
|
||||
switch (check.type) {
|
||||
case 'word':
|
||||
return item.includes(check.value.toLowerCase())
|
||||
case 'operator':
|
||||
if (check.value.toUpperCase() === 'OR') {
|
||||
return checkItem(check.left, item) || checkItem(check.right, item)
|
||||
}
|
||||
if (check.value.toUpperCase() === 'AND') {
|
||||
return checkItem(check.left, item) && checkItem(check.right, item)
|
||||
}
|
||||
throw new Error(`Unknown operator: ${check.value}`)
|
||||
case 'group':
|
||||
return filter(check.children, [item]).length > 0
|
||||
case 'phrase':
|
||||
return item.includes(check.value.toLowerCase())
|
||||
}
|
||||
}
|
||||
7
tsconfig.example.json
Normal file
7
tsconfig.example.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"files": [
|
||||
"src/index.ts",
|
||||
"src/example.ts",
|
||||
],
|
||||
}
|
||||
63
typedoc.config.js
Normal file
63
typedoc.config.js
Normal file
@@ -0,0 +1,63 @@
|
||||
const path = require('path')
|
||||
|
||||
/** @type {import('typedoc').TypeDocOptions} */
|
||||
module.exports = {
|
||||
name: 'search-parse',
|
||||
entryPoints: ['src/index.ts'],
|
||||
includeVersion: true,
|
||||
categorizeByGroup: false,
|
||||
sort: ['visibility'],
|
||||
categoryOrder: ['Main', '*'],
|
||||
media: 'media',
|
||||
githubPages: true,
|
||||
entryPointStrategy: 'expand',
|
||||
out: 'docs',
|
||||
excludePrivate: true,
|
||||
excludeProtected: true,
|
||||
excludeInternal: true,
|
||||
gaID: '', // TODO: Add GA ID
|
||||
validation: {
|
||||
invalidLink: true,
|
||||
},
|
||||
// plugin: ['@knodes/typedoc-plugin-pages'],
|
||||
customCss: 'src/docs.css',
|
||||
options: 'typedoc.config.js',
|
||||
logLevel: 'Verbose',
|
||||
/* pluginPages: {
|
||||
logLevel: "Verbose",
|
||||
pages: [
|
||||
{
|
||||
name: "Configuration",
|
||||
source: "README.md",
|
||||
childrenDir: path.join(process.cwd(), "pages"),
|
||||
childrenOutputDir: "./",
|
||||
children: [
|
||||
{
|
||||
name: "CLI usage",
|
||||
source: "cli.md",
|
||||
},
|
||||
{
|
||||
name: "Node.js usage",
|
||||
source: "node.md",
|
||||
},
|
||||
{
|
||||
name: "Templates",
|
||||
source: "templates.md",
|
||||
},
|
||||
{
|
||||
name: "Configuration Files",
|
||||
source: "configuration_files.md",
|
||||
},
|
||||
{
|
||||
name: "Migrating v0.x to v1.x",
|
||||
source: "migration.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Changelog",
|
||||
source: "./CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
} ,*/
|
||||
}
|
||||
64
yarn.lock
64
yarn.lock
@@ -709,6 +709,11 @@ ansi-regex@^5.0.1:
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-sequence-parser@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed"
|
||||
integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
||||
@@ -821,6 +826,13 @@ brace-expansion@^1.1.7:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
brace-expansion@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
|
||||
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
|
||||
braces@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||
@@ -1685,6 +1697,11 @@ json5@^2.2.1:
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
|
||||
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
|
||||
|
||||
jsonc-parser@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
|
||||
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
||||
|
||||
kleur@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
|
||||
@@ -1719,6 +1736,11 @@ lru-cache@^6.0.0:
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
lunr@^2.3.9:
|
||||
version "2.3.9"
|
||||
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1"
|
||||
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==
|
||||
|
||||
make-dir@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
||||
@@ -1738,6 +1760,11 @@ makeerror@1.0.12:
|
||||
dependencies:
|
||||
tmpl "1.0.5"
|
||||
|
||||
marked@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
|
||||
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
|
||||
|
||||
merge-stream@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
|
||||
@@ -1763,6 +1790,13 @@ minimatch@^3.0.4, minimatch@^3.1.1:
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimatch@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56"
|
||||
integrity sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
ms@2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
@@ -1977,6 +2011,16 @@ shebang-regex@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
|
||||
shiki@^0.14.1:
|
||||
version "0.14.2"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.2.tgz#d51440800b701392b31ce2336036058e338247a1"
|
||||
integrity sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==
|
||||
dependencies:
|
||||
ansi-sequence-parser "^1.1.0"
|
||||
jsonc-parser "^3.2.0"
|
||||
vscode-oniguruma "^1.7.0"
|
||||
vscode-textmate "^8.0.0"
|
||||
|
||||
signal-exit@^3.0.3, signal-exit@^3.0.7:
|
||||
version "3.0.7"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
|
||||
@@ -2167,6 +2211,16 @@ type-fest@^0.21.3:
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
|
||||
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
|
||||
|
||||
typedoc@^0.24.6:
|
||||
version "0.24.6"
|
||||
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.6.tgz#1f76fac27db9c6626b5b5c79f78f3c813b285827"
|
||||
integrity sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==
|
||||
dependencies:
|
||||
lunr "^2.3.9"
|
||||
marked "^4.3.0"
|
||||
minimatch "^9.0.0"
|
||||
shiki "^0.14.1"
|
||||
|
||||
typescript@^4.7.4:
|
||||
version "4.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
|
||||
@@ -2194,6 +2248,16 @@ v8-to-istanbul@^9.0.1:
|
||||
"@types/istanbul-lib-coverage" "^2.0.1"
|
||||
convert-source-map "^1.6.0"
|
||||
|
||||
vscode-oniguruma@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b"
|
||||
integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==
|
||||
|
||||
vscode-textmate@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d"
|
||||
integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==
|
||||
|
||||
walker@^1.0.8:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f"
|
||||
|
||||
Reference in New Issue
Block a user