mirror of https://github.com/Wilfred/difftastic/
Unvendor tree-sitter-r
parent
84d037343d
commit
dd5ce7ae3d
@ -1 +0,0 @@
|
|||||||
../tree-sitter-r/queries/highlights.scm
|
|
||||||
@ -1 +0,0 @@
|
|||||||
tree-sitter-r/src
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
||||||
|
|
||||||
name: build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v1
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run build --if-present
|
|
||||||
- run: npm test
|
|
||||||
|
|
||||||
- name: Run cargo check
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
node_modules
|
|
||||||
build
|
|
||||||
*.log
|
|
||||||
target
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
# This file is automatically @generated by Cargo.
|
|
||||||
# It is not intended for manual editing.
|
|
||||||
version = 3
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "aho-corasick"
|
|
||||||
version = "0.7.18"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
|
|
||||||
dependencies = [
|
|
||||||
"memchr",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cc"
|
|
||||||
version = "1.0.69"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memchr"
|
|
||||||
version = "2.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex"
|
|
||||||
version = "1.5.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
|
|
||||||
dependencies = [
|
|
||||||
"aho-corasick",
|
|
||||||
"memchr",
|
|
||||||
"regex-syntax",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex-syntax"
|
|
||||||
version = "0.6.25"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tree-sitter"
|
|
||||||
version = "0.20.9"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d4423c784fe11398ca91e505cdc71356b07b1a924fc8735cfab5333afe3e18bc"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"regex",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tree-sitter-r"
|
|
||||||
version = "0.19.5"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"tree-sitter",
|
|
||||||
]
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tree-sitter-r"
|
|
||||||
description = "R grammar for the tree-sitter parsing library"
|
|
||||||
version = "0.19.5"
|
|
||||||
authors = [
|
|
||||||
"Jim Hester <jim.hester@rstudio.com>"
|
|
||||||
]
|
|
||||||
license = "MIT"
|
|
||||||
keywords = ["incremental", "parsing", "R"]
|
|
||||||
categories = ["parsing", "text-editors"]
|
|
||||||
repository = "https://github.com/r-lib/tree-sitter-r"
|
|
||||||
edition = "2018"
|
|
||||||
|
|
||||||
build = "bindings/rust/build.rs"
|
|
||||||
include = [
|
|
||||||
"bindings/rust/*",
|
|
||||||
"grammar.js",
|
|
||||||
"queries/*",
|
|
||||||
"src/*",
|
|
||||||
]
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
path = "bindings/rust/lib.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
tree-sitter = ">= 0.20, < 0.21"
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
cc = "1.0"
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
MIT License
|
|
||||||
Copyright (c) 2020 tree-sitter-r authors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
tree-sitter-r
|
|
||||||
===========================
|
|
||||||
|
|
||||||
[](https://github.com/jimhester/tree-sitter-r/actions?query=workflow%3Abuild)
|
|
||||||
|
|
||||||
R grammar for [tree-sitter][].
|
|
||||||
|
|
||||||
[tree-sitter]: https://github.com/tree-sitter/tree-sitter
|
|
||||||
|
|
||||||
# Rust bindings
|
|
||||||
|
|
||||||
This grammar is available as a [Rust crate on crates.io](https://crates.io/crates/tree-sitter-r).
|
|
||||||
|
|
||||||
# References
|
|
||||||
|
|
||||||
* [The R Draft Spec](https://cran.r-project.org/doc/manuals/r-release/R-lang.pdf)
|
|
||||||
* [gram.y](https://github.com/wch/r-source/blob/trunk/src/main/gram.y)
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"target_name": "tree_sitter_r_binding",
|
|
||||||
"include_dirs": [
|
|
||||||
"<!(node -e \"require('nan')\")",
|
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
"src/parser.c",
|
|
||||||
"src/scanner.cc",
|
|
||||||
"bindings/node/binding.cc"
|
|
||||||
],
|
|
||||||
"cflags_c": [
|
|
||||||
"-std=c99",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
#include "tree_sitter/parser.h"
|
|
||||||
#include <node.h>
|
|
||||||
#include "nan.h"
|
|
||||||
|
|
||||||
using namespace v8;
|
|
||||||
|
|
||||||
extern "C" TSLanguage * tree_sitter_r();
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
NAN_METHOD(New) {}
|
|
||||||
|
|
||||||
void Init(Local<Object> exports, Local<Object> module) {
|
|
||||||
Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(New);
|
|
||||||
tpl->SetClassName(Nan::New("Language").ToLocalChecked());
|
|
||||||
tpl->InstanceTemplate()->SetInternalFieldCount(1);
|
|
||||||
|
|
||||||
Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked();
|
|
||||||
Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();
|
|
||||||
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_r());
|
|
||||||
|
|
||||||
Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("r").ToLocalChecked());
|
|
||||||
Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
NODE_MODULE(tree_sitter_r_binding, Init)
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
try {
|
|
||||||
module.exports = require("../../build/Release/tree_sitter_r_binding");
|
|
||||||
} catch (error1) {
|
|
||||||
if (error1.code !== 'MODULE_NOT_FOUND') {
|
|
||||||
throw error1;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
module.exports = require("../../build/Debug/tree_sitter_r_binding");
|
|
||||||
} catch (error2) {
|
|
||||||
if (error2.code !== 'MODULE_NOT_FOUND') {
|
|
||||||
throw error2;
|
|
||||||
}
|
|
||||||
throw error1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
module.exports.nodeTypeInfo = require("../../src/node-types.json");
|
|
||||||
} catch (_) {}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
fn main() {
|
|
||||||
let src_dir = std::path::Path::new("src");
|
|
||||||
|
|
||||||
let mut c_config = cc::Build::new();
|
|
||||||
c_config.include(&src_dir);
|
|
||||||
c_config
|
|
||||||
.flag_if_supported("-Wno-unused-parameter")
|
|
||||||
.flag_if_supported("-Wno-unused-but-set-variable")
|
|
||||||
.flag_if_supported("-Wno-trigraphs");
|
|
||||||
let parser_path = src_dir.join("parser.c");
|
|
||||||
c_config.file(&parser_path);
|
|
||||||
|
|
||||||
// If your language uses an external scanner written in C,
|
|
||||||
// then include this block of code:
|
|
||||||
|
|
||||||
/*
|
|
||||||
let scanner_path = src_dir.join("scanner.c");
|
|
||||||
c_config.file(&scanner_path);
|
|
||||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
|
||||||
*/
|
|
||||||
|
|
||||||
c_config.compile("parser");
|
|
||||||
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
|
|
||||||
|
|
||||||
// If your language uses an external scanner written in C++,
|
|
||||||
// then include this block of code:
|
|
||||||
|
|
||||||
/*
|
|
||||||
let mut cpp_config = cc::Build::new();
|
|
||||||
cpp_config.cpp(true);
|
|
||||||
cpp_config.include(&src_dir);
|
|
||||||
cpp_config
|
|
||||||
.flag_if_supported("-Wno-unused-parameter")
|
|
||||||
.flag_if_supported("-Wno-unused-but-set-variable");
|
|
||||||
let scanner_path = src_dir.join("scanner.cc");
|
|
||||||
cpp_config.file(&scanner_path);
|
|
||||||
cpp_config.compile("scanner");
|
|
||||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
//! This crate provides r language support for the [tree-sitter][] parsing library.
|
|
||||||
//!
|
|
||||||
//! Typically, you will use the [language][language func] function to add this language to a
|
|
||||||
//! tree-sitter [Parser][], and then use the parser to parse some code:
|
|
||||||
//!
|
|
||||||
//! ```
|
|
||||||
//! let code = "";
|
|
||||||
//! let mut parser = tree_sitter::Parser::new();
|
|
||||||
//! parser.set_language(tree_sitter_r::language()).expect("Error loading r grammar");
|
|
||||||
//! let tree = parser.parse(code, None).unwrap();
|
|
||||||
//! ```
|
|
||||||
//!
|
|
||||||
//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html
|
|
||||||
//! [language func]: fn.language.html
|
|
||||||
//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html
|
|
||||||
//! [tree-sitter]: https://tree-sitter.github.io/
|
|
||||||
|
|
||||||
use tree_sitter::Language;
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
fn tree_sitter_r() -> Language;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the tree-sitter [Language][] for this grammar.
|
|
||||||
///
|
|
||||||
/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html
|
|
||||||
pub fn language() -> Language {
|
|
||||||
unsafe { tree_sitter_r() }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The content of the [`node-types.json`][] file for this grammar.
|
|
||||||
///
|
|
||||||
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
|
|
||||||
pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json");
|
|
||||||
|
|
||||||
// Uncomment these to include any queries that this grammar contains
|
|
||||||
|
|
||||||
// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm");
|
|
||||||
// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm");
|
|
||||||
// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm");
|
|
||||||
// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm");
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
#[test]
|
|
||||||
fn test_can_load_grammar() {
|
|
||||||
let mut parser = tree_sitter::Parser::new();
|
|
||||||
parser
|
|
||||||
.set_language(super::language())
|
|
||||||
.expect("Error loading r language");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,531 +0,0 @@
|
|||||||
|
|
||||||
// The R 4.2.0 syntax table, from ?Syntax:
|
|
||||||
//
|
|
||||||
// ':: :::' access variables in a namespace
|
|
||||||
// '$ @' component / slot extraction
|
|
||||||
// '[ [[' indexing
|
|
||||||
// '^' exponentiation (right to left)
|
|
||||||
// '- +' unary minus and plus
|
|
||||||
// ':' sequence operator
|
|
||||||
// '%any% |>' special operators (including '%%' and '%/%')
|
|
||||||
// '* /' multiply, divide
|
|
||||||
// '+ -' (binary) add, subtract
|
|
||||||
// '< > <= >= == !=' ordering and comparison
|
|
||||||
// '!' negation
|
|
||||||
// '& &&' and
|
|
||||||
// '| ||' or
|
|
||||||
// '~' as in formulae
|
|
||||||
// '-> ->>' rightwards assignment
|
|
||||||
// '<- <<-' assignment (right to left)
|
|
||||||
// '=' assignment (right to left)
|
|
||||||
// '?' help (unary and binary)
|
|
||||||
//
|
|
||||||
// R also has an operator precedence table defined here:
|
|
||||||
//
|
|
||||||
// https://github.com/wch/r-source/blob/36008873fb8ca2af3bdaaff418dbade5f7bce118/src/main/gram.y#L414-L436
|
|
||||||
//
|
|
||||||
// However, the effective precedence of '?' and '=' is a bit different, as R
|
|
||||||
// defines special reduction rules for these operators:
|
|
||||||
//
|
|
||||||
// https://github.com/wch/r-source/blob/36008873fb8ca2af3bdaaff418dbade5f7bce118/src/main/gram.y#L440-L453
|
|
||||||
//
|
|
||||||
// Rather than try to replicate those reduction rules, we just adjust the
|
|
||||||
// operator precedence to match the declared precedence in the R syntax table,
|
|
||||||
// while allowing for R's declared precedence differences between certain
|
|
||||||
// control flow keywords.
|
|
||||||
const PREC = {
|
|
||||||
COMMENT: -1,
|
|
||||||
LOW: 0,
|
|
||||||
WHILE: 0,
|
|
||||||
FOR: 0,
|
|
||||||
REPEAT: 0,
|
|
||||||
IF: 1,
|
|
||||||
ELSE: 2,
|
|
||||||
HELP: 3,
|
|
||||||
EQ_ASSIGN: 4,
|
|
||||||
LEFT_ASSIGN: 5,
|
|
||||||
RIGHT_ASSIGN: 6,
|
|
||||||
TILDE: 7,
|
|
||||||
OR: 8,
|
|
||||||
AND: 9,
|
|
||||||
NOT: 10,
|
|
||||||
REL: 11,
|
|
||||||
PLUS: 12,
|
|
||||||
TIMES: 13,
|
|
||||||
SPECIAL: 14,
|
|
||||||
PIPE: 14,
|
|
||||||
PIPEBIND: 15,
|
|
||||||
COLON: 16,
|
|
||||||
UPLUS: 17,
|
|
||||||
EXP: 18,
|
|
||||||
SUBSET: 19,
|
|
||||||
DOLLAR: 20,
|
|
||||||
NS_GET: 21,
|
|
||||||
CALL: 22,
|
|
||||||
CALL_PIPE: 23,
|
|
||||||
FLOAT: 24
|
|
||||||
}
|
|
||||||
|
|
||||||
newline = '\n',
|
|
||||||
terminator = choice(newline, ';'),
|
|
||||||
|
|
||||||
module.exports = grammar({
|
|
||||||
name: 'r',
|
|
||||||
|
|
||||||
extras: $ => [
|
|
||||||
$.comment,
|
|
||||||
/\s/
|
|
||||||
],
|
|
||||||
|
|
||||||
conflicts: ($) => [
|
|
||||||
[$._pipe_rhs_argument, $._argument],
|
|
||||||
[$.pipe_rhs_arguments, $.arguments]
|
|
||||||
],
|
|
||||||
|
|
||||||
externals: $ => [
|
|
||||||
$._raw_string_literal
|
|
||||||
],
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
program: $ => repeat(seq($._expression, optional(terminator))),
|
|
||||||
|
|
||||||
_definition: $ => choice(
|
|
||||||
$.function_definition,
|
|
||||||
$.lambda_function
|
|
||||||
// TODO: other kinds of definitions
|
|
||||||
),
|
|
||||||
|
|
||||||
function_definition: $ => prec.left(PREC.LOW, seq(
|
|
||||||
'function',
|
|
||||||
$.formal_parameters,
|
|
||||||
$._expression
|
|
||||||
)),
|
|
||||||
|
|
||||||
lambda_function: $ => prec.left(PREC.LOW, seq(
|
|
||||||
'\\',
|
|
||||||
$.formal_parameters,
|
|
||||||
$._expression
|
|
||||||
)),
|
|
||||||
|
|
||||||
if: $ => prec.right(PREC.IF, seq(
|
|
||||||
'if',
|
|
||||||
'(',
|
|
||||||
field('condition', $._expression),
|
|
||||||
')',
|
|
||||||
field('consequence', $._expression),
|
|
||||||
field('alternative', optional(seq('else', $._expression)))
|
|
||||||
)),
|
|
||||||
|
|
||||||
while: $ => prec.left(PREC.WHILE, seq(
|
|
||||||
'while',
|
|
||||||
'(',
|
|
||||||
field('condition', $._expression),
|
|
||||||
')',
|
|
||||||
field('body', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
repeat: $ => prec.left(PREC.REPEAT, seq(
|
|
||||||
'repeat',
|
|
||||||
field('body', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
for: $ => prec.left(PREC.FOR, seq(
|
|
||||||
'for',
|
|
||||||
'(',
|
|
||||||
field('name', $.identifier),
|
|
||||||
'in',
|
|
||||||
field('vector', $._expression),
|
|
||||||
')',
|
|
||||||
field('body', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
switch: $ => seq(
|
|
||||||
'switch',
|
|
||||||
'(',
|
|
||||||
field('value', $._expression),
|
|
||||||
',',
|
|
||||||
field('body', $.arguments),
|
|
||||||
')'
|
|
||||||
),
|
|
||||||
|
|
||||||
formal_parameters: $ => seq(
|
|
||||||
'(',
|
|
||||||
optional(seq(
|
|
||||||
commaSep1($._formal_parameter),
|
|
||||||
optional(',')
|
|
||||||
)),
|
|
||||||
')'
|
|
||||||
),
|
|
||||||
|
|
||||||
default_parameter: $ => seq(
|
|
||||||
field('name', $.identifier),
|
|
||||||
'=',
|
|
||||||
field('value', $._expression)
|
|
||||||
),
|
|
||||||
|
|
||||||
_formal_parameter: $ => choice(
|
|
||||||
$.identifier,
|
|
||||||
$.default_parameter,
|
|
||||||
$.dots
|
|
||||||
),
|
|
||||||
|
|
||||||
block: $ => seq(
|
|
||||||
'{',
|
|
||||||
repeat($._expression),
|
|
||||||
'}'
|
|
||||||
),
|
|
||||||
|
|
||||||
arguments: $ => repeat1(choice(
|
|
||||||
$._argument,
|
|
||||||
',',
|
|
||||||
)),
|
|
||||||
|
|
||||||
default_argument: $ => prec.right(seq(
|
|
||||||
field('name', choice($.identifier, $.string, $.dots)),
|
|
||||||
'=',
|
|
||||||
field('value', optional($._expression))
|
|
||||||
)),
|
|
||||||
|
|
||||||
_argument: $ => prec.left(choice(
|
|
||||||
$._expression,
|
|
||||||
$.default_argument,
|
|
||||||
)),
|
|
||||||
|
|
||||||
call: $ => prec(PREC.CALL, seq(
|
|
||||||
field('function', $._expression),
|
|
||||||
'(',
|
|
||||||
field('arguments', optional($.arguments)),
|
|
||||||
')'
|
|
||||||
)),
|
|
||||||
|
|
||||||
_assignment: $ => choice(
|
|
||||||
$.equals_assignment,
|
|
||||||
$.left_assignment,
|
|
||||||
$.left_assignment2,
|
|
||||||
$.right_assignment,
|
|
||||||
$.super_assignment,
|
|
||||||
$.super_right_assignment,
|
|
||||||
),
|
|
||||||
|
|
||||||
left_assignment: $ => prec.right(PREC.LEFT_ASSIGN,
|
|
||||||
seq(
|
|
||||||
field('name', $._expression),
|
|
||||||
'<-',
|
|
||||||
field('value', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
left_assignment2: $ => prec.right(PREC.LEFT_ASSIGN,
|
|
||||||
seq(
|
|
||||||
field('name', $._expression),
|
|
||||||
':=',
|
|
||||||
field('value', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
equals_assignment: $ => prec.right(PREC.EQ_ASSIGN,
|
|
||||||
seq(
|
|
||||||
field('name', $._expression),
|
|
||||||
'=',
|
|
||||||
field('value', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
super_assignment: $ => prec.right(PREC.LEFT_ASSIGN,
|
|
||||||
seq(
|
|
||||||
field('name', $._expression),
|
|
||||||
'<<-',
|
|
||||||
field('value', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
super_right_assignment: $ => prec.left(PREC.RIGHT_ASSIGN,
|
|
||||||
seq(
|
|
||||||
field('value', $._expression),
|
|
||||||
'->>',
|
|
||||||
field('name', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
right_assignment: $ => prec.left(PREC.RIGHT_ASSIGN,
|
|
||||||
seq(
|
|
||||||
field('value', $._expression),
|
|
||||||
'->',
|
|
||||||
field('name', $._expression)
|
|
||||||
)),
|
|
||||||
|
|
||||||
brace_list: $ => seq(
|
|
||||||
'{',
|
|
||||||
repeat(
|
|
||||||
seq($._expression, optional(terminator))
|
|
||||||
),
|
|
||||||
'}'
|
|
||||||
),
|
|
||||||
|
|
||||||
paren_list: $ => seq(
|
|
||||||
'(',
|
|
||||||
repeat(
|
|
||||||
$._expression
|
|
||||||
),
|
|
||||||
')'
|
|
||||||
),
|
|
||||||
|
|
||||||
subset: $ => prec(PREC.SUBSET, seq(
|
|
||||||
$._expression,
|
|
||||||
'[',
|
|
||||||
optional($.arguments),
|
|
||||||
']'
|
|
||||||
)),
|
|
||||||
|
|
||||||
subset2: $ => prec(PREC.SUBSET, seq(
|
|
||||||
$._expression,
|
|
||||||
'[[',
|
|
||||||
optional($.arguments),
|
|
||||||
']]'
|
|
||||||
)),
|
|
||||||
|
|
||||||
dollar: $ => prec.left(PREC.DOLLAR, seq(
|
|
||||||
$._expression,
|
|
||||||
'$',
|
|
||||||
choice(
|
|
||||||
$.identifier,
|
|
||||||
$.string
|
|
||||||
)
|
|
||||||
)),
|
|
||||||
|
|
||||||
slot: $ => prec.left(PREC.DOLLAR, seq(
|
|
||||||
$._expression,
|
|
||||||
'@',
|
|
||||||
$.identifier
|
|
||||||
)),
|
|
||||||
|
|
||||||
namespace_get: $ => prec.left(PREC.NS_GET, seq(
|
|
||||||
field('namespace', $.identifier),
|
|
||||||
'::',
|
|
||||||
field('function', $.identifier),
|
|
||||||
)),
|
|
||||||
|
|
||||||
namespace_get_internal: $ => prec.left(PREC.NS_GET, seq(
|
|
||||||
field('namespace', $.identifier),
|
|
||||||
':::',
|
|
||||||
field('function', $.identifier),
|
|
||||||
)),
|
|
||||||
|
|
||||||
help: $ => prec.left(PREC.HELP, seq(
|
|
||||||
$._expression,
|
|
||||||
'?',
|
|
||||||
$._expression
|
|
||||||
)),
|
|
||||||
|
|
||||||
dots: $ => '...',
|
|
||||||
|
|
||||||
placeholder: $ => '_',
|
|
||||||
|
|
||||||
pipe_placeholder_argument: $ => prec.right(seq(
|
|
||||||
field('name', $.identifier),
|
|
||||||
'=',
|
|
||||||
field('value', $.placeholder)
|
|
||||||
)),
|
|
||||||
|
|
||||||
_pipe_rhs_argument: $ => prec.right(choice(
|
|
||||||
$._expression,
|
|
||||||
$.default_argument,
|
|
||||||
alias($.pipe_placeholder_argument, $.default_argument)
|
|
||||||
)),
|
|
||||||
|
|
||||||
pipe_rhs_arguments: $ => repeat1(choice(
|
|
||||||
$._pipe_rhs_argument,
|
|
||||||
','
|
|
||||||
)),
|
|
||||||
|
|
||||||
// pipe_rhs is a call function
|
|
||||||
pipe_rhs: $ => prec.left(PREC.CALL_PIPE, seq(
|
|
||||||
field('function', $._expression),
|
|
||||||
'(',
|
|
||||||
field('arguments', optional(alias($.pipe_rhs_arguments, $.arguments))),
|
|
||||||
')'
|
|
||||||
)),
|
|
||||||
|
|
||||||
pipe: $ => prec.left(PREC.PIPE, seq(
|
|
||||||
field('left', $._expression),
|
|
||||||
field('operator', '|>'),
|
|
||||||
field('right', alias($.pipe_rhs, $.call))
|
|
||||||
)),
|
|
||||||
|
|
||||||
unary: $ => {
|
|
||||||
const operators = [
|
|
||||||
[PREC.UPLUS, choice('-', '+')],
|
|
||||||
[PREC.NOT, '!'],
|
|
||||||
[PREC.TILDE, '~'],
|
|
||||||
[PREC.HELP, '?'],
|
|
||||||
];
|
|
||||||
|
|
||||||
return choice(...operators.map(([precedence, operator]) => prec.left(precedence, seq(
|
|
||||||
field('operator', operator),
|
|
||||||
field('operand', $._expression)
|
|
||||||
))));
|
|
||||||
},
|
|
||||||
|
|
||||||
binary: $ => {
|
|
||||||
const operators = [
|
|
||||||
[prec.left, PREC.PLUS, choice('+', '-')],
|
|
||||||
[prec.left, PREC.TIMES, choice('*', '/')],
|
|
||||||
[prec.right, PREC.EXP, '^'],
|
|
||||||
[prec.left, PREC.REL, choice('<', '>', '<=', '>=', '==', '!=')],
|
|
||||||
[prec.left, PREC.OR, choice('||', '|')],
|
|
||||||
[prec.left, PREC.AND, choice('&&', '&')],
|
|
||||||
[prec.left, PREC.SPECIAL, $.special],
|
|
||||||
[prec.left, PREC.COLON, ':'],
|
|
||||||
[prec.left, PREC.TILDE, '~'],
|
|
||||||
];
|
|
||||||
|
|
||||||
return choice(...operators.map(([fn, precedence, operator]) => fn(precedence, seq(
|
|
||||||
field('left', $._expression),
|
|
||||||
field('operator', operator),
|
|
||||||
field('right', $._expression)
|
|
||||||
))));
|
|
||||||
},
|
|
||||||
|
|
||||||
break: $ => 'break',
|
|
||||||
|
|
||||||
next: $ => 'next',
|
|
||||||
|
|
||||||
true: $ => 'TRUE',
|
|
||||||
false: $ => 'FALSE',
|
|
||||||
null: $ => 'NULL',
|
|
||||||
inf: $ => 'Inf',
|
|
||||||
nan: $ => 'NaN',
|
|
||||||
|
|
||||||
na: $ => choice(
|
|
||||||
'NA',
|
|
||||||
'NA_character_',
|
|
||||||
'NA_complex_',
|
|
||||||
'NA_integer_',
|
|
||||||
'NA_real_'
|
|
||||||
),
|
|
||||||
|
|
||||||
_expression: $ => prec.right(choice(
|
|
||||||
$.identifier,
|
|
||||||
$.integer,
|
|
||||||
$.float,
|
|
||||||
$.complex,
|
|
||||||
$.string,
|
|
||||||
$.call,
|
|
||||||
$.function_definition,
|
|
||||||
$.lambda_function,
|
|
||||||
$._assignment,
|
|
||||||
$.brace_list,
|
|
||||||
$.paren_list,
|
|
||||||
$.binary,
|
|
||||||
$.unary,
|
|
||||||
$.pipe,
|
|
||||||
$.subset,
|
|
||||||
$.subset2,
|
|
||||||
$.dollar,
|
|
||||||
$.slot,
|
|
||||||
$.namespace_get,
|
|
||||||
$.namespace_get_internal,
|
|
||||||
$.help,
|
|
||||||
$.if,
|
|
||||||
$.for,
|
|
||||||
$.while,
|
|
||||||
$.repeat,
|
|
||||||
$.switch,
|
|
||||||
$.break,
|
|
||||||
$.next,
|
|
||||||
$.true,
|
|
||||||
$.false,
|
|
||||||
$.null,
|
|
||||||
$.inf,
|
|
||||||
$.nan,
|
|
||||||
$.na,
|
|
||||||
$.dots,
|
|
||||||
// ';'
|
|
||||||
)),
|
|
||||||
|
|
||||||
identifier: $ =>
|
|
||||||
choice(
|
|
||||||
/[.\p{XID_Start}][._\p{XID_Continue}]*/,
|
|
||||||
seq(
|
|
||||||
'`',
|
|
||||||
repeat(choice(
|
|
||||||
/[^`\\\n]+|\\\r?\n/,
|
|
||||||
$.escape_sequence
|
|
||||||
)),
|
|
||||||
'`'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
integer: $ => token(prec(PREC.FLOAT + 1,
|
|
||||||
seq(
|
|
||||||
choice(
|
|
||||||
seq(
|
|
||||||
choice('0x', '0X'),
|
|
||||||
/[A-Fa-f0-9]+/
|
|
||||||
),
|
|
||||||
/\d+/
|
|
||||||
),
|
|
||||||
'L'
|
|
||||||
))),
|
|
||||||
|
|
||||||
float: $ => {
|
|
||||||
const digits = repeat1(/[0-9]/);
|
|
||||||
const exponent = seq(/[eE][\+-]?/, digits)
|
|
||||||
|
|
||||||
return token(prec.left(PREC.FLOAT,
|
|
||||||
choice(
|
|
||||||
seq(digits, optional('.'), optional(digits), optional(exponent)),
|
|
||||||
seq(optional(digits), '.', digits, optional(exponent)),
|
|
||||||
seq(digits, exponent),
|
|
||||||
seq(
|
|
||||||
choice('0x', '0X'),
|
|
||||||
/[A-Fa-f0-9]+/
|
|
||||||
)
|
|
||||||
)
|
|
||||||
))
|
|
||||||
},
|
|
||||||
|
|
||||||
complex: $ => seq($.float, 'i'),
|
|
||||||
|
|
||||||
comment: $ => token(prec(PREC.COMMENT, seq('#', /.*/))),
|
|
||||||
|
|
||||||
string: $ => choice(
|
|
||||||
$._raw_string_literal,
|
|
||||||
seq(
|
|
||||||
'"',
|
|
||||||
repeat(choice(
|
|
||||||
/[^"\\\n]+|\\\r?\n/,
|
|
||||||
$.escape_sequence
|
|
||||||
)),
|
|
||||||
'"'
|
|
||||||
),
|
|
||||||
seq(
|
|
||||||
"'",
|
|
||||||
repeat(choice(
|
|
||||||
/[^'\\\n]+|\\\r?\n/,
|
|
||||||
$.escape_sequence
|
|
||||||
)),
|
|
||||||
"'"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
special: $ => seq(
|
|
||||||
'%',
|
|
||||||
repeat(choice(
|
|
||||||
/[^%\\\n]+|\\\r?\n/,
|
|
||||||
$.escape_sequence
|
|
||||||
)),
|
|
||||||
'%'
|
|
||||||
),
|
|
||||||
|
|
||||||
escape_sequence: $ => token.immediate(seq(
|
|
||||||
'\\',
|
|
||||||
choice(
|
|
||||||
/[^xu0-7]/,
|
|
||||||
/[0-7]{1,3}/,
|
|
||||||
/x[0-9a-fA-F]{2}/,
|
|
||||||
/u[0-9a-fA-F]{4}/,
|
|
||||||
/u{[0-9a-fA-F]+}/
|
|
||||||
)
|
|
||||||
))
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function commaSep1(rule) {
|
|
||||||
return seq(rule, repeat(seq(',', rule)));
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "tree-sitter-r",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"description": "R grammar for tree-sitter",
|
|
||||||
"main": "bindings/node",
|
|
||||||
"keywords": [
|
|
||||||
"parser",
|
|
||||||
"lexer"
|
|
||||||
],
|
|
||||||
"author": "Max Brunsfeld",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"nan": "^2.14.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"tree-sitter": "^0.20.0",
|
|
||||||
"tree-sitter-cli": "^0.20.3"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "tree-sitter test"
|
|
||||||
},
|
|
||||||
"tree-sitter": [
|
|
||||||
{
|
|
||||||
"scope": "source.R",
|
|
||||||
"file-types": [
|
|
||||||
"R",
|
|
||||||
"r"
|
|
||||||
],
|
|
||||||
"first-line-regex": "#!.*\\bRscript$"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,128 +0,0 @@
|
|||||||
; highlights.scm
|
|
||||||
|
|
||||||
|
|
||||||
; Literals
|
|
||||||
|
|
||||||
(integer) @number
|
|
||||||
|
|
||||||
(float) @float
|
|
||||||
|
|
||||||
(complex) @number
|
|
||||||
|
|
||||||
(string) @string
|
|
||||||
(string (escape_sequence) @string.escape)
|
|
||||||
|
|
||||||
(comment) @comment
|
|
||||||
|
|
||||||
(identifier) @variable
|
|
||||||
|
|
||||||
(formal_parameters (identifier) @parameter)
|
|
||||||
(formal_parameters (default_parameter (identifier) @parameter))
|
|
||||||
|
|
||||||
; Operators
|
|
||||||
[
|
|
||||||
"="
|
|
||||||
"<-"
|
|
||||||
"<<-"
|
|
||||||
"->>"
|
|
||||||
"->"
|
|
||||||
] @operator
|
|
||||||
|
|
||||||
(unary operator: [
|
|
||||||
"-"
|
|
||||||
"+"
|
|
||||||
"!"
|
|
||||||
"~"
|
|
||||||
] @operator)
|
|
||||||
|
|
||||||
(binary operator: [
|
|
||||||
"-"
|
|
||||||
"+"
|
|
||||||
"*"
|
|
||||||
"/"
|
|
||||||
"^"
|
|
||||||
"<"
|
|
||||||
">"
|
|
||||||
"<="
|
|
||||||
">="
|
|
||||||
"=="
|
|
||||||
"!="
|
|
||||||
"||"
|
|
||||||
"|"
|
|
||||||
"&&"
|
|
||||||
"&"
|
|
||||||
":"
|
|
||||||
"~"
|
|
||||||
] @operator)
|
|
||||||
|
|
||||||
[
|
|
||||||
"|>"
|
|
||||||
(special)
|
|
||||||
] @operator
|
|
||||||
|
|
||||||
(lambda_function "\\" @operator)
|
|
||||||
|
|
||||||
[
|
|
||||||
"("
|
|
||||||
")"
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
"{"
|
|
||||||
"}"
|
|
||||||
] @punctuation.bracket
|
|
||||||
|
|
||||||
(dollar "$" @operator)
|
|
||||||
|
|
||||||
(subset2
|
|
||||||
[
|
|
||||||
"[["
|
|
||||||
"]]"
|
|
||||||
] @punctuation.bracket)
|
|
||||||
|
|
||||||
[
|
|
||||||
"in"
|
|
||||||
(dots)
|
|
||||||
(break)
|
|
||||||
(next)
|
|
||||||
(inf)
|
|
||||||
] @keyword
|
|
||||||
|
|
||||||
[
|
|
||||||
(nan)
|
|
||||||
(na)
|
|
||||||
(null)
|
|
||||||
] @type.builtin
|
|
||||||
|
|
||||||
[
|
|
||||||
"if"
|
|
||||||
"else"
|
|
||||||
"switch"
|
|
||||||
] @conditional
|
|
||||||
|
|
||||||
[
|
|
||||||
"while"
|
|
||||||
"repeat"
|
|
||||||
"for"
|
|
||||||
] @repeat
|
|
||||||
|
|
||||||
[
|
|
||||||
(true)
|
|
||||||
(false)
|
|
||||||
] @boolean
|
|
||||||
|
|
||||||
"function" @keyword.function
|
|
||||||
|
|
||||||
(call function: (identifier) @function)
|
|
||||||
(default_argument name: (identifier) @parameter)
|
|
||||||
|
|
||||||
|
|
||||||
(namespace_get function: (identifier) @method)
|
|
||||||
(namespace_get_internal function: (identifier) @method)
|
|
||||||
|
|
||||||
(namespace_get namespace: (identifier) @namespace
|
|
||||||
"::" @operator)
|
|
||||||
(namespace_get_internal namespace: (identifier) @namespace
|
|
||||||
":::" @operator)
|
|
||||||
|
|
||||||
; Error
|
|
||||||
(ERROR) @error
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
; locals.scm
|
|
||||||
|
|
||||||
(function_definition) @local.scope
|
|
||||||
|
|
||||||
(formal_parameters (identifier) @local.definition)
|
|
||||||
|
|
||||||
(left_assignment name: (identifier) @local.definition)
|
|
||||||
(equals_assignment name: (identifier) @local.definition)
|
|
||||||
(right_assignment name: (identifier) @local.definition)
|
|
||||||
|
|
||||||
(identifier) @local.reference
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,127 +0,0 @@
|
|||||||
|
|
||||||
#include <tree_sitter/parser.h>
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
enum TokenType {
|
|
||||||
RAW_STRING_LITERAL,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Scanner {
|
|
||||||
|
|
||||||
bool scan(TSLexer* lexer, const bool* valid_symbols) {
|
|
||||||
|
|
||||||
// scan a raw string literal; see R source code for implementation:
|
|
||||||
// https://github.com/wch/r-source/blob/52b730f217c12ba3d95dee0cd1f330d1977b5ea3/src/main/gram.y#L3102
|
|
||||||
|
|
||||||
// raw string literals can start with either 'r' or 'R'
|
|
||||||
char prefix = lexer->lookahead;
|
|
||||||
if (prefix != 'r' && prefix != 'R') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
|
|
||||||
// check for quote character
|
|
||||||
char quote = lexer->lookahead;
|
|
||||||
if (quote != '"' && quote != '\'') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
|
|
||||||
// start counting '-' characters
|
|
||||||
int hyphen_count = 0;
|
|
||||||
while (lexer->lookahead == '-') {
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
hyphen_count += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check for an opening bracket, and figure out
|
|
||||||
// the corresponding closing bracket
|
|
||||||
char opening_bracket = lexer->lookahead;
|
|
||||||
char closing_bracket = 0;
|
|
||||||
if (opening_bracket == '(') {
|
|
||||||
closing_bracket = ')';
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
} else if (opening_bracket == '[') {
|
|
||||||
closing_bracket = ']';
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
} else if (opening_bracket == '{') {
|
|
||||||
closing_bracket = '}';
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// we're in the body of the raw string; start looping until
|
|
||||||
// we find the matching closing bracket
|
|
||||||
for (; lexer->lookahead != 0; lexer->advance(lexer, false)) {
|
|
||||||
|
|
||||||
// consume a closing bracket
|
|
||||||
if (lexer->lookahead != closing_bracket) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
|
|
||||||
// consume hyphens
|
|
||||||
bool hyphens_ok = true;
|
|
||||||
for (int i = 0; i < hyphen_count; i++) {
|
|
||||||
if (lexer->lookahead != '-') {
|
|
||||||
hyphens_ok = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hyphens_ok) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// consume a closing quote character
|
|
||||||
if (lexer->lookahead != quote) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
lexer->advance(lexer, false);
|
|
||||||
|
|
||||||
// success!
|
|
||||||
lexer->result_symbol = RAW_STRING_LITERAL;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we get here, this implies we hit eof (and so we have
|
|
||||||
// an unclosed raw string)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
} // end anonymous namespace
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
void *tree_sitter_r_external_scanner_create() {
|
|
||||||
return new Scanner();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool tree_sitter_r_external_scanner_scan(void *payload,
|
|
||||||
TSLexer *lexer,
|
|
||||||
const bool *valid_symbols)
|
|
||||||
{
|
|
||||||
Scanner* scanner = static_cast<Scanner*>(payload);
|
|
||||||
return scanner->scan(lexer, valid_symbols);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned tree_sitter_r_external_scanner_serialize(void *payload, char *buffer) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void tree_sitter_r_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void tree_sitter_r_external_scanner_destroy(void *payload) {
|
|
||||||
Scanner* scanner = static_cast<Scanner*>(payload);
|
|
||||||
delete scanner;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // extern "C"
|
|
||||||
@ -1,224 +0,0 @@
|
|||||||
#ifndef TREE_SITTER_PARSER_H_
|
|
||||||
#define TREE_SITTER_PARSER_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define ts_builtin_sym_error ((TSSymbol)-1)
|
|
||||||
#define ts_builtin_sym_end 0
|
|
||||||
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
|
|
||||||
|
|
||||||
typedef uint16_t TSStateId;
|
|
||||||
|
|
||||||
#ifndef TREE_SITTER_API_H_
|
|
||||||
typedef uint16_t TSSymbol;
|
|
||||||
typedef uint16_t TSFieldId;
|
|
||||||
typedef struct TSLanguage TSLanguage;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
TSFieldId field_id;
|
|
||||||
uint8_t child_index;
|
|
||||||
bool inherited;
|
|
||||||
} TSFieldMapEntry;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint16_t index;
|
|
||||||
uint16_t length;
|
|
||||||
} TSFieldMapSlice;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
bool visible;
|
|
||||||
bool named;
|
|
||||||
bool supertype;
|
|
||||||
} TSSymbolMetadata;
|
|
||||||
|
|
||||||
typedef struct TSLexer TSLexer;
|
|
||||||
|
|
||||||
struct TSLexer {
|
|
||||||
int32_t lookahead;
|
|
||||||
TSSymbol result_symbol;
|
|
||||||
void (*advance)(TSLexer *, bool);
|
|
||||||
void (*mark_end)(TSLexer *);
|
|
||||||
uint32_t (*get_column)(TSLexer *);
|
|
||||||
bool (*is_at_included_range_start)(const TSLexer *);
|
|
||||||
bool (*eof)(const TSLexer *);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
TSParseActionTypeShift,
|
|
||||||
TSParseActionTypeReduce,
|
|
||||||
TSParseActionTypeAccept,
|
|
||||||
TSParseActionTypeRecover,
|
|
||||||
} TSParseActionType;
|
|
||||||
|
|
||||||
typedef union {
|
|
||||||
struct {
|
|
||||||
uint8_t type;
|
|
||||||
TSStateId state;
|
|
||||||
bool extra;
|
|
||||||
bool repetition;
|
|
||||||
} shift;
|
|
||||||
struct {
|
|
||||||
uint8_t type;
|
|
||||||
uint8_t child_count;
|
|
||||||
TSSymbol symbol;
|
|
||||||
int16_t dynamic_precedence;
|
|
||||||
uint16_t production_id;
|
|
||||||
} reduce;
|
|
||||||
uint8_t type;
|
|
||||||
} TSParseAction;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint16_t lex_state;
|
|
||||||
uint16_t external_lex_state;
|
|
||||||
} TSLexMode;
|
|
||||||
|
|
||||||
typedef union {
|
|
||||||
TSParseAction action;
|
|
||||||
struct {
|
|
||||||
uint8_t count;
|
|
||||||
bool reusable;
|
|
||||||
} entry;
|
|
||||||
} TSParseActionEntry;
|
|
||||||
|
|
||||||
struct TSLanguage {
|
|
||||||
uint32_t version;
|
|
||||||
uint32_t symbol_count;
|
|
||||||
uint32_t alias_count;
|
|
||||||
uint32_t token_count;
|
|
||||||
uint32_t external_token_count;
|
|
||||||
uint32_t state_count;
|
|
||||||
uint32_t large_state_count;
|
|
||||||
uint32_t production_id_count;
|
|
||||||
uint32_t field_count;
|
|
||||||
uint16_t max_alias_sequence_length;
|
|
||||||
const uint16_t *parse_table;
|
|
||||||
const uint16_t *small_parse_table;
|
|
||||||
const uint32_t *small_parse_table_map;
|
|
||||||
const TSParseActionEntry *parse_actions;
|
|
||||||
const char * const *symbol_names;
|
|
||||||
const char * const *field_names;
|
|
||||||
const TSFieldMapSlice *field_map_slices;
|
|
||||||
const TSFieldMapEntry *field_map_entries;
|
|
||||||
const TSSymbolMetadata *symbol_metadata;
|
|
||||||
const TSSymbol *public_symbol_map;
|
|
||||||
const uint16_t *alias_map;
|
|
||||||
const TSSymbol *alias_sequences;
|
|
||||||
const TSLexMode *lex_modes;
|
|
||||||
bool (*lex_fn)(TSLexer *, TSStateId);
|
|
||||||
bool (*keyword_lex_fn)(TSLexer *, TSStateId);
|
|
||||||
TSSymbol keyword_capture_token;
|
|
||||||
struct {
|
|
||||||
const bool *states;
|
|
||||||
const TSSymbol *symbol_map;
|
|
||||||
void *(*create)(void);
|
|
||||||
void (*destroy)(void *);
|
|
||||||
bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist);
|
|
||||||
unsigned (*serialize)(void *, char *);
|
|
||||||
void (*deserialize)(void *, const char *, unsigned);
|
|
||||||
} external_scanner;
|
|
||||||
const TSStateId *primary_state_ids;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Lexer Macros
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define START_LEXER() \
|
|
||||||
bool result = false; \
|
|
||||||
bool skip = false; \
|
|
||||||
bool eof = false; \
|
|
||||||
int32_t lookahead; \
|
|
||||||
goto start; \
|
|
||||||
next_state: \
|
|
||||||
lexer->advance(lexer, skip); \
|
|
||||||
start: \
|
|
||||||
skip = false; \
|
|
||||||
lookahead = lexer->lookahead;
|
|
||||||
|
|
||||||
#define ADVANCE(state_value) \
|
|
||||||
{ \
|
|
||||||
state = state_value; \
|
|
||||||
goto next_state; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SKIP(state_value) \
|
|
||||||
{ \
|
|
||||||
skip = true; \
|
|
||||||
state = state_value; \
|
|
||||||
goto next_state; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ACCEPT_TOKEN(symbol_value) \
|
|
||||||
result = true; \
|
|
||||||
lexer->result_symbol = symbol_value; \
|
|
||||||
lexer->mark_end(lexer);
|
|
||||||
|
|
||||||
#define END_STATE() return result;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Parse Table Macros
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define SMALL_STATE(id) id - LARGE_STATE_COUNT
|
|
||||||
|
|
||||||
#define STATE(id) id
|
|
||||||
|
|
||||||
#define ACTIONS(id) id
|
|
||||||
|
|
||||||
#define SHIFT(state_value) \
|
|
||||||
{{ \
|
|
||||||
.shift = { \
|
|
||||||
.type = TSParseActionTypeShift, \
|
|
||||||
.state = state_value \
|
|
||||||
} \
|
|
||||||
}}
|
|
||||||
|
|
||||||
#define SHIFT_REPEAT(state_value) \
|
|
||||||
{{ \
|
|
||||||
.shift = { \
|
|
||||||
.type = TSParseActionTypeShift, \
|
|
||||||
.state = state_value, \
|
|
||||||
.repetition = true \
|
|
||||||
} \
|
|
||||||
}}
|
|
||||||
|
|
||||||
#define SHIFT_EXTRA() \
|
|
||||||
{{ \
|
|
||||||
.shift = { \
|
|
||||||
.type = TSParseActionTypeShift, \
|
|
||||||
.extra = true \
|
|
||||||
} \
|
|
||||||
}}
|
|
||||||
|
|
||||||
#define REDUCE(symbol_val, child_count_val, ...) \
|
|
||||||
{{ \
|
|
||||||
.reduce = { \
|
|
||||||
.type = TSParseActionTypeReduce, \
|
|
||||||
.symbol = symbol_val, \
|
|
||||||
.child_count = child_count_val, \
|
|
||||||
__VA_ARGS__ \
|
|
||||||
}, \
|
|
||||||
}}
|
|
||||||
|
|
||||||
#define RECOVER() \
|
|
||||||
{{ \
|
|
||||||
.type = TSParseActionTypeRecover \
|
|
||||||
}}
|
|
||||||
|
|
||||||
#define ACCEPT_INPUT() \
|
|
||||||
{{ \
|
|
||||||
.type = TSParseActionTypeAccept \
|
|
||||||
}}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // TREE_SITTER_PARSER_H_
|
|
||||||
@ -1,970 +0,0 @@
|
|||||||
============================================
|
|
||||||
Functions
|
|
||||||
============================================
|
|
||||||
function() 1
|
|
||||||
function() {}
|
|
||||||
function(arg1, arg2) {
|
|
||||||
arg2
|
|
||||||
}
|
|
||||||
|
|
||||||
function(x, y) return(y)
|
|
||||||
|
|
||||||
function(x, ...) f(...)
|
|
||||||
|
|
||||||
function(arg1, arg2 = 2) {}
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
(program
|
|
||||||
(function_definition (formal_parameters) (float))
|
|
||||||
(function_definition (formal_parameters) (brace_list))
|
|
||||||
(function_definition
|
|
||||||
(formal_parameters (identifier) (identifier))
|
|
||||||
(brace_list (identifier)))
|
|
||||||
(function_definition
|
|
||||||
(formal_parameters (identifier) (identifier))
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier))))
|
|
||||||
(function_definition
|
|
||||||
(formal_parameters (identifier) (dots))
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(dots))))
|
|
||||||
(function_definition
|
|
||||||
(formal_parameters
|
|
||||||
(identifier)
|
|
||||||
(default_parameter
|
|
||||||
name: (identifier)
|
|
||||||
value: (float)))
|
|
||||||
(brace_list)))
|
|
||||||
|
|
||||||
=======================
|
|
||||||
Lambda Function
|
|
||||||
=======================
|
|
||||||
|
|
||||||
a <- \(arg) arg
|
|
||||||
b <- \(arg1, arg2) paste0(arg1, arg2)
|
|
||||||
c <- \(fun, ...) fun(...)
|
|
||||||
1:3 |> {\(x, y = 1) x + y}() |> {\(x) sum(x)}()
|
|
||||||
{\(a = 1) a + 1}()
|
|
||||||
\() 1 + 2
|
|
||||||
---
|
|
||||||
(program
|
|
||||||
|
|
||||||
(left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (lambda_function
|
|
||||||
(formal_parameters (identifier))
|
|
||||||
(identifier)))
|
|
||||||
|
|
||||||
(left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (lambda_function
|
|
||||||
(formal_parameters
|
|
||||||
(identifier)
|
|
||||||
(identifier))
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(identifier)
|
|
||||||
(identifier)))))
|
|
||||||
|
|
||||||
(left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (lambda_function
|
|
||||||
(formal_parameters
|
|
||||||
(identifier)
|
|
||||||
(dots))
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (dots)))))
|
|
||||||
|
|
||||||
(pipe
|
|
||||||
left: (pipe
|
|
||||||
left: (binary
|
|
||||||
left: (float)
|
|
||||||
right: (float))
|
|
||||||
right: (call
|
|
||||||
function: (brace_list
|
|
||||||
(lambda_function
|
|
||||||
(formal_parameters
|
|
||||||
(identifier)
|
|
||||||
(default_parameter
|
|
||||||
name: (identifier)
|
|
||||||
value: (float)))
|
|
||||||
(binary
|
|
||||||
left: (identifier)
|
|
||||||
right: (identifier))))))
|
|
||||||
right: (call
|
|
||||||
function: (brace_list
|
|
||||||
(lambda_function
|
|
||||||
(formal_parameters
|
|
||||||
(identifier))
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(identifier)))))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (brace_list
|
|
||||||
(lambda_function
|
|
||||||
(formal_parameters
|
|
||||||
(default_parameter
|
|
||||||
name: (identifier)
|
|
||||||
value: (float)))
|
|
||||||
(binary
|
|
||||||
left: (identifier)
|
|
||||||
right: (float)))))
|
|
||||||
|
|
||||||
(lambda_function
|
|
||||||
(formal_parameters)
|
|
||||||
(binary
|
|
||||||
left: (float)
|
|
||||||
right: (float))))
|
|
||||||
|
|
||||||
==========
|
|
||||||
Relational
|
|
||||||
==========
|
|
||||||
|
|
||||||
a == b
|
|
||||||
|
|
||||||
---
|
|
||||||
(program
|
|
||||||
(binary
|
|
||||||
left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
========
|
|
||||||
Additive
|
|
||||||
========
|
|
||||||
|
|
||||||
a + b
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(binary
|
|
||||||
left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
========
|
|
||||||
Multiplicative
|
|
||||||
========
|
|
||||||
|
|
||||||
a * b
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(binary
|
|
||||||
left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
==============
|
|
||||||
Binary operations
|
|
||||||
==============
|
|
||||||
|
|
||||||
2+2*2
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(binary
|
|
||||||
left: (float)
|
|
||||||
right: (binary
|
|
||||||
left: (float)
|
|
||||||
right: (float))))
|
|
||||||
|
|
||||||
===========
|
|
||||||
Unary minus
|
|
||||||
===========
|
|
||||||
|
|
||||||
-a
|
|
||||||
foo(-a, bar)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(unary operand: (identifier))
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(unary operand: (identifier))
|
|
||||||
(identifier))))
|
|
||||||
|
|
||||||
===========
|
|
||||||
Binary minus
|
|
||||||
===========
|
|
||||||
|
|
||||||
foo-a
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(binary left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
|
|
||||||
===================
|
|
||||||
Operator precedence
|
|
||||||
===================
|
|
||||||
|
|
||||||
a <= b && c >= d
|
|
||||||
a[1] <- foo || bar
|
|
||||||
a && b(c) && d
|
|
||||||
val <- foo %>% bar(1) %>% baz()
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
|
|
||||||
(binary
|
|
||||||
left: (binary left: (identifier) right: (identifier))
|
|
||||||
right: (binary left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
(left_assignment
|
|
||||||
name: (subset (identifier) (arguments (float)))
|
|
||||||
value: (binary left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
(binary
|
|
||||||
left: (binary
|
|
||||||
left: (identifier)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(identifier))))
|
|
||||||
right: (identifier))
|
|
||||||
|
|
||||||
(left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (binary
|
|
||||||
left: (binary
|
|
||||||
left: (identifier)
|
|
||||||
operator: (special)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(float))))
|
|
||||||
operator: (special)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)))))
|
|
||||||
|
|
||||||
========
|
|
||||||
Specials
|
|
||||||
========
|
|
||||||
|
|
||||||
x %% y
|
|
||||||
|
|
||||||
x %+% y
|
|
||||||
|
|
||||||
x %>% y
|
|
||||||
|
|
||||||
x %some text% y
|
|
||||||
|
|
||||||
x %some \% escaped text% y
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(binary left: (identifier) operator: (special) right: (identifier))
|
|
||||||
(binary left: (identifier) operator: (special) right: (identifier))
|
|
||||||
(binary left: (identifier) operator: (special) right: (identifier))
|
|
||||||
(binary left: (identifier) operator: (special) right: (identifier))
|
|
||||||
(binary left: (identifier) operator: (special (escape_sequence)) right: (identifier)))
|
|
||||||
|
|
||||||
========
|
|
||||||
Pipe
|
|
||||||
========
|
|
||||||
|
|
||||||
x |> print()
|
|
||||||
|
|
||||||
x |> foo() |> bar() + baz()
|
|
||||||
|
|
||||||
x |> {function(x) x}()
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
|
|
||||||
(pipe
|
|
||||||
left: (identifier)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)))
|
|
||||||
|
|
||||||
(binary
|
|
||||||
left: (pipe
|
|
||||||
left: (pipe
|
|
||||||
left: (identifier)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)))
|
|
||||||
right: (call
|
|
||||||
function: (identifier)))
|
|
||||||
right: (call
|
|
||||||
function: (identifier)))
|
|
||||||
|
|
||||||
(pipe
|
|
||||||
left: (identifier)
|
|
||||||
right: (call
|
|
||||||
function: (brace_list
|
|
||||||
(function_definition
|
|
||||||
(formal_parameters
|
|
||||||
(identifier))
|
|
||||||
(identifier))))))
|
|
||||||
|
|
||||||
===========
|
|
||||||
Pipe Placeholder
|
|
||||||
===========
|
|
||||||
|
|
||||||
foo |> bar(x, y = _)
|
|
||||||
foo |> bar() |> baz(data = _)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(pipe
|
|
||||||
left: (identifier)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(identifier)
|
|
||||||
(default_argument
|
|
||||||
name: (identifier)
|
|
||||||
value: (placeholder)))))
|
|
||||||
(pipe
|
|
||||||
left: (pipe
|
|
||||||
left: (identifier)
|
|
||||||
right: (call
|
|
||||||
function: (identifier)))
|
|
||||||
right: (call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (identifier)
|
|
||||||
value: (placeholder))))))
|
|
||||||
|
|
||||||
===========
|
|
||||||
Subset
|
|
||||||
===========
|
|
||||||
|
|
||||||
foo[bar]
|
|
||||||
foo[1, 2]
|
|
||||||
foo[1, ]
|
|
||||||
foo[]
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(subset
|
|
||||||
(identifier)
|
|
||||||
(arguments
|
|
||||||
(identifier)))
|
|
||||||
(subset
|
|
||||||
(identifier)
|
|
||||||
(arguments
|
|
||||||
(float)
|
|
||||||
(float)))
|
|
||||||
(subset
|
|
||||||
(identifier)
|
|
||||||
(arguments
|
|
||||||
(float)))
|
|
||||||
(subset
|
|
||||||
(identifier)))
|
|
||||||
|
|
||||||
===========
|
|
||||||
Subset2
|
|
||||||
===========
|
|
||||||
|
|
||||||
foo[[x]]
|
|
||||||
foo[[x, y]]
|
|
||||||
foo[[]]
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(subset2 (identifier)
|
|
||||||
(arguments (identifier)))
|
|
||||||
|
|
||||||
(subset2 (identifier)
|
|
||||||
(arguments (identifier) (identifier)))
|
|
||||||
|
|
||||||
(subset2
|
|
||||||
(identifier)))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
If
|
|
||||||
============================================
|
|
||||||
|
|
||||||
if (x)
|
|
||||||
log(y)
|
|
||||||
|
|
||||||
if (a.b) {
|
|
||||||
log(c)
|
|
||||||
d
|
|
||||||
}
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(if
|
|
||||||
condition: (identifier)
|
|
||||||
consequence: (call function: (identifier) arguments: (arguments (identifier))))
|
|
||||||
(if
|
|
||||||
condition: (identifier)
|
|
||||||
consequence: (brace_list
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier)))
|
|
||||||
(identifier))))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
If-else
|
|
||||||
============================================
|
|
||||||
|
|
||||||
if (x)
|
|
||||||
y else if (a)
|
|
||||||
b
|
|
||||||
|
|
||||||
if (a) {
|
|
||||||
c
|
|
||||||
d
|
|
||||||
} else {
|
|
||||||
e
|
|
||||||
}
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(if
|
|
||||||
condition: (identifier)
|
|
||||||
consequence: (identifier)
|
|
||||||
alternative: (if
|
|
||||||
condition: (identifier)
|
|
||||||
consequence: (identifier)))
|
|
||||||
|
|
||||||
(if
|
|
||||||
condition: (identifier)
|
|
||||||
consequence: (brace_list (identifier) (identifier))
|
|
||||||
alternative: (brace_list (identifier))))
|
|
||||||
|
|
||||||
|
|
||||||
===
|
|
||||||
for
|
|
||||||
===
|
|
||||||
|
|
||||||
for (x in y)
|
|
||||||
f
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(for
|
|
||||||
name: (identifier)
|
|
||||||
vector: (identifier)
|
|
||||||
body: (identifier)))
|
|
||||||
|
|
||||||
=====
|
|
||||||
While
|
|
||||||
=====
|
|
||||||
while(TRUE)
|
|
||||||
bar
|
|
||||||
|
|
||||||
while(x > 0)
|
|
||||||
x <- x - 1
|
|
||||||
|
|
||||||
while(TRUE)
|
|
||||||
break
|
|
||||||
|
|
||||||
while(TRUE)
|
|
||||||
next
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(while
|
|
||||||
condition: (true)
|
|
||||||
body: (identifier))
|
|
||||||
|
|
||||||
(while
|
|
||||||
condition: (binary
|
|
||||||
left: (identifier)
|
|
||||||
right: (float))
|
|
||||||
body: (left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (binary
|
|
||||||
left: (identifier)
|
|
||||||
right: (float))))
|
|
||||||
|
|
||||||
(while
|
|
||||||
condition: (true)
|
|
||||||
body: (break))
|
|
||||||
|
|
||||||
(while
|
|
||||||
condition: (true)
|
|
||||||
body: (next)))
|
|
||||||
|
|
||||||
=====
|
|
||||||
Repeat
|
|
||||||
=====
|
|
||||||
|
|
||||||
repeat 1
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(repeat
|
|
||||||
body: (float)))
|
|
||||||
|
|
||||||
======
|
|
||||||
Switch
|
|
||||||
======
|
|
||||||
|
|
||||||
switch(foo,
|
|
||||||
x = 1,
|
|
||||||
"y" = 2,
|
|
||||||
z = ,
|
|
||||||
3
|
|
||||||
)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(switch
|
|
||||||
value: (identifier)
|
|
||||||
body: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (identifier)
|
|
||||||
value: (float))
|
|
||||||
(default_argument
|
|
||||||
name: (string)
|
|
||||||
value: (float))
|
|
||||||
(default_argument
|
|
||||||
name: (identifier))
|
|
||||||
(float))))
|
|
||||||
|
|
||||||
======
|
|
||||||
Dollar
|
|
||||||
======
|
|
||||||
|
|
||||||
foo$bar
|
|
||||||
|
|
||||||
foo$"bar"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(dollar
|
|
||||||
(identifier) (identifier))
|
|
||||||
(dollar
|
|
||||||
(identifier) (string)))
|
|
||||||
|
|
||||||
======
|
|
||||||
Slot
|
|
||||||
======
|
|
||||||
|
|
||||||
foo@bar
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(slot
|
|
||||||
(identifier) (identifier)))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Namespace get
|
|
||||||
============================================
|
|
||||||
|
|
||||||
foo::bar
|
|
||||||
foo::bar(1)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(namespace_get
|
|
||||||
namespace: (identifier)
|
|
||||||
function: (identifier))
|
|
||||||
(call
|
|
||||||
function: (namespace_get
|
|
||||||
namespace: (identifier)
|
|
||||||
function: (identifier))
|
|
||||||
arguments: (arguments (float))))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Namespace get internal
|
|
||||||
============================================
|
|
||||||
|
|
||||||
foo:::bar
|
|
||||||
foo:::bar(1)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(namespace_get_internal
|
|
||||||
namespace: (identifier)
|
|
||||||
function: (identifier))
|
|
||||||
(call
|
|
||||||
function: (namespace_get_internal
|
|
||||||
namespace: (identifier)
|
|
||||||
function: (identifier))
|
|
||||||
arguments: (arguments (float))))
|
|
||||||
|
|
||||||
==========
|
|
||||||
Assignment
|
|
||||||
==========
|
|
||||||
|
|
||||||
x <- 1
|
|
||||||
x = 1
|
|
||||||
x := 1
|
|
||||||
x <<- 1
|
|
||||||
1 ->> x
|
|
||||||
1 -> x
|
|
||||||
x <- y(1)
|
|
||||||
y(1) -> x
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (float))
|
|
||||||
|
|
||||||
(equals_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (float))
|
|
||||||
|
|
||||||
(left_assignment2
|
|
||||||
name: (identifier)
|
|
||||||
value: (float))
|
|
||||||
|
|
||||||
(super_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (float))
|
|
||||||
|
|
||||||
(super_right_assignment
|
|
||||||
value: (float)
|
|
||||||
name: (identifier))
|
|
||||||
|
|
||||||
(right_assignment
|
|
||||||
value: (float)
|
|
||||||
name: (identifier))
|
|
||||||
|
|
||||||
(left_assignment
|
|
||||||
name: (identifier)
|
|
||||||
value: (call function: (identifier) arguments: (arguments (float))))
|
|
||||||
|
|
||||||
(right_assignment
|
|
||||||
value: (call function: (identifier) arguments: (arguments (float)))
|
|
||||||
name: (identifier)))
|
|
||||||
|
|
||||||
=====
|
|
||||||
Calls
|
|
||||||
=====
|
|
||||||
|
|
||||||
f()
|
|
||||||
f(x)
|
|
||||||
f(1+1)
|
|
||||||
f(1 ~ 1)
|
|
||||||
f(x, )
|
|
||||||
f(x, y)
|
|
||||||
f(x, y = 2)
|
|
||||||
f(x = 1 + 1)
|
|
||||||
f(x, y =)
|
|
||||||
f(f2(x, y))
|
|
||||||
f(,)
|
|
||||||
f(x,)
|
|
||||||
f(,y)
|
|
||||||
f(x=,)
|
|
||||||
f("x"=,)
|
|
||||||
f(... = ,)
|
|
||||||
f(,y=)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
|
|
||||||
(call function: (identifier))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier)))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(binary
|
|
||||||
left: (float)
|
|
||||||
right: (float))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(binary
|
|
||||||
left: (float)
|
|
||||||
right: (float))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier)))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier) (identifier)))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(identifier)
|
|
||||||
(default_argument
|
|
||||||
name: (identifier)
|
|
||||||
value: (float))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (identifier)
|
|
||||||
value: (binary left: (float) right: (float)))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(identifier)
|
|
||||||
(default_argument
|
|
||||||
name: (identifier))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier) (identifier)))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier)))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments (identifier)))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (identifier))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (string))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (dots))))
|
|
||||||
|
|
||||||
(call
|
|
||||||
function: (identifier)
|
|
||||||
arguments: (arguments
|
|
||||||
(default_argument
|
|
||||||
name: (identifier)))))
|
|
||||||
|
|
||||||
======
|
|
||||||
Braces
|
|
||||||
======
|
|
||||||
|
|
||||||
{}
|
|
||||||
|
|
||||||
{1}
|
|
||||||
|
|
||||||
{1; 2}
|
|
||||||
|
|
||||||
{1;
|
|
||||||
2}
|
|
||||||
|
|
||||||
{1
|
|
||||||
2
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
1
|
|
||||||
2
|
|
||||||
}
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(brace_list)
|
|
||||||
(brace_list (float))
|
|
||||||
(brace_list (float) (float))
|
|
||||||
(brace_list (float) (float))
|
|
||||||
(brace_list (float) (float))
|
|
||||||
(brace_list (float) (float)))
|
|
||||||
|
|
||||||
=====
|
|
||||||
Colon
|
|
||||||
=====
|
|
||||||
|
|
||||||
1:2
|
|
||||||
(1 + 1):-5
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(binary left: (float) right: (float))
|
|
||||||
|
|
||||||
(binary
|
|
||||||
left: (paren_list
|
|
||||||
(binary
|
|
||||||
left: (float)
|
|
||||||
right: (float)))
|
|
||||||
right: (unary
|
|
||||||
operand: (float))))
|
|
||||||
|
|
||||||
=====
|
|
||||||
Formulas
|
|
||||||
=====
|
|
||||||
|
|
||||||
~x
|
|
||||||
y~x
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
|
|
||||||
(unary operand: (identifier))
|
|
||||||
|
|
||||||
(binary left: (identifier) right: (identifier)))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Help Operator
|
|
||||||
============================================
|
|
||||||
a ? b
|
|
||||||
a ? b <- 1
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(help
|
|
||||||
(identifier)
|
|
||||||
(identifier))
|
|
||||||
(help
|
|
||||||
(identifier)
|
|
||||||
(left_assignment
|
|
||||||
(identifier)
|
|
||||||
(float))))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Complex Expressions
|
|
||||||
============================================
|
|
||||||
repeat if (1) TRUE else repeat 42
|
|
||||||
if (TRUE) if (FALSE) 2 else NULL
|
|
||||||
a::b$c[[d]] <- e
|
|
||||||
TRUE ~ FALSE ~ NULL ? NA ? NaN
|
|
||||||
if (TRUE) FALSE
|
|
||||||
else NA
|
|
||||||
(if (TRUE) FALSE
|
|
||||||
else NA)
|
|
||||||
a = TRUE ? FALSE
|
|
||||||
TRUE <- FALSE = NA
|
|
||||||
TRUE <- FALSE ? NA
|
|
||||||
TRUE = FALSE ? NA
|
|
||||||
TRUE ? FALSE = NA
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(repeat
|
|
||||||
(if
|
|
||||||
(float)
|
|
||||||
(true)
|
|
||||||
(repeat
|
|
||||||
(float))))
|
|
||||||
(if
|
|
||||||
(true)
|
|
||||||
(if
|
|
||||||
(false)
|
|
||||||
(float)
|
|
||||||
(null)))
|
|
||||||
(left_assignment
|
|
||||||
(subset2
|
|
||||||
(dollar
|
|
||||||
(namespace_get
|
|
||||||
(identifier)
|
|
||||||
(identifier))
|
|
||||||
(identifier))
|
|
||||||
(arguments
|
|
||||||
(identifier)))
|
|
||||||
(identifier))
|
|
||||||
(help
|
|
||||||
(help
|
|
||||||
(binary
|
|
||||||
(binary
|
|
||||||
(true)
|
|
||||||
(false))
|
|
||||||
(null))
|
|
||||||
(na))
|
|
||||||
(nan))
|
|
||||||
(if
|
|
||||||
(true)
|
|
||||||
(false))
|
|
||||||
(identifier)
|
|
||||||
(na)
|
|
||||||
(paren_list
|
|
||||||
(if
|
|
||||||
(true)
|
|
||||||
(false)
|
|
||||||
(na)))
|
|
||||||
(help
|
|
||||||
(equals_assignment
|
|
||||||
(identifier)
|
|
||||||
(true))
|
|
||||||
(false))
|
|
||||||
(equals_assignment
|
|
||||||
(left_assignment
|
|
||||||
(true)
|
|
||||||
(false))
|
|
||||||
(na))
|
|
||||||
(help
|
|
||||||
(left_assignment
|
|
||||||
(true)
|
|
||||||
(false))
|
|
||||||
(na))
|
|
||||||
(help
|
|
||||||
(equals_assignment
|
|
||||||
(true)
|
|
||||||
(false))
|
|
||||||
(na))
|
|
||||||
(help
|
|
||||||
(true)
|
|
||||||
(equals_assignment
|
|
||||||
(false)
|
|
||||||
(na))))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Precedence Tests
|
|
||||||
============================================
|
|
||||||
A$"B"^NA
|
|
||||||
a::b$c
|
|
||||||
a$b?c
|
|
||||||
|
|
||||||
----
|
|
||||||
(program
|
|
||||||
(binary
|
|
||||||
(dollar
|
|
||||||
(identifier)
|
|
||||||
(string))
|
|
||||||
(na))
|
|
||||||
(dollar
|
|
||||||
(namespace_get
|
|
||||||
(identifier)
|
|
||||||
(identifier))
|
|
||||||
(identifier))
|
|
||||||
(help
|
|
||||||
(dollar
|
|
||||||
(identifier)
|
|
||||||
(identifier))
|
|
||||||
(identifier)))
|
|
||||||
@ -1,186 +0,0 @@
|
|||||||
============================================
|
|
||||||
Identifiers
|
|
||||||
============================================
|
|
||||||
|
|
||||||
foo
|
|
||||||
foo2
|
|
||||||
foo.bar
|
|
||||||
.foo.bar
|
|
||||||
foo_bar
|
|
||||||
`a "literal"`
|
|
||||||
`another
|
|
||||||
literal \` foo`
|
|
||||||
_foo
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
(program
|
|
||||||
(identifier)
|
|
||||||
(identifier)
|
|
||||||
(identifier)
|
|
||||||
(identifier)
|
|
||||||
(identifier)
|
|
||||||
(identifier)
|
|
||||||
(identifier (escape_sequence))
|
|
||||||
(ERROR (placeholder)) (identifier))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Unicode Identifiers
|
|
||||||
============================================
|
|
||||||
|
|
||||||
你好
|
|
||||||
.你.好.
|
|
||||||
.你_好.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
(program
|
|
||||||
(identifier)
|
|
||||||
(identifier)
|
|
||||||
(identifier))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Strings
|
|
||||||
============================================
|
|
||||||
|
|
||||||
"foo"
|
|
||||||
"foo\"bar"
|
|
||||||
'foo'
|
|
||||||
'foo\'bar'
|
|
||||||
"#"
|
|
||||||
'#'
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
(program
|
|
||||||
(string)
|
|
||||||
(string (escape_sequence))
|
|
||||||
(string)
|
|
||||||
(string (escape_sequence))
|
|
||||||
(string)
|
|
||||||
(string))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Raw Strings
|
|
||||||
============================================
|
|
||||||
r"(raw string)"
|
|
||||||
R"{another raw string}"
|
|
||||||
R"--[yet another ]- raw string]--"
|
|
||||||
r"not a raw string"
|
|
||||||
r"-(an unclosed raw string"
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
(program
|
|
||||||
(string)
|
|
||||||
(string)
|
|
||||||
(string)
|
|
||||||
(identifier) (string)
|
|
||||||
(identifier) (string))
|
|
||||||
|
|
||||||
============================================
|
|
||||||
Comments
|
|
||||||
============================================
|
|
||||||
|
|
||||||
# a comment'
|
|
||||||
|
|
||||||
'# not a comment'
|
|
||||||
|
|
||||||
|
|
||||||
'
|
|
||||||
# still not a comment'
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(comment)
|
|
||||||
(string)
|
|
||||||
(string))
|
|
||||||
|
|
||||||
========
|
|
||||||
Constants
|
|
||||||
========
|
|
||||||
|
|
||||||
TRUE
|
|
||||||
FALSE
|
|
||||||
NULL
|
|
||||||
Inf
|
|
||||||
NaN
|
|
||||||
NA
|
|
||||||
NA_real_
|
|
||||||
NA_character_
|
|
||||||
NA_complex_
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(true)
|
|
||||||
(false)
|
|
||||||
(null)
|
|
||||||
(inf)
|
|
||||||
(nan)
|
|
||||||
(na)
|
|
||||||
(na)
|
|
||||||
(na)
|
|
||||||
(na))
|
|
||||||
|
|
||||||
========
|
|
||||||
Integers
|
|
||||||
========
|
|
||||||
|
|
||||||
12332L
|
|
||||||
0L
|
|
||||||
12L
|
|
||||||
0xDEADL
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(integer)
|
|
||||||
(integer)
|
|
||||||
(integer)
|
|
||||||
(integer))
|
|
||||||
|
|
||||||
======
|
|
||||||
Floats
|
|
||||||
======
|
|
||||||
|
|
||||||
.66
|
|
||||||
.11
|
|
||||||
123.4123
|
|
||||||
.1234
|
|
||||||
0xDEAD
|
|
||||||
x <- -.66
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
|
|
||||||
(left_assignment (identifier) (unary (float))))
|
|
||||||
|
|
||||||
=====================================
|
|
||||||
Scientific Notation Floats
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
1e322
|
|
||||||
1e-3
|
|
||||||
1e+3
|
|
||||||
1.8e10
|
|
||||||
1.e10
|
|
||||||
1e10
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
(program
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float)
|
|
||||||
(float))
|
|
||||||
@ -1,405 +0,0 @@
|
|||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"ansi-regex@^2.0.0":
|
|
||||||
"integrity" "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz"
|
|
||||||
"version" "2.1.1"
|
|
||||||
|
|
||||||
"aproba@^1.0.3":
|
|
||||||
"integrity" "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz"
|
|
||||||
"version" "1.2.0"
|
|
||||||
|
|
||||||
"are-we-there-yet@~1.1.2":
|
|
||||||
"integrity" "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g=="
|
|
||||||
"resolved" "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz"
|
|
||||||
"version" "1.1.7"
|
|
||||||
dependencies:
|
|
||||||
"delegates" "^1.0.0"
|
|
||||||
"readable-stream" "^2.0.6"
|
|
||||||
|
|
||||||
"base64-js@^1.3.1":
|
|
||||||
"integrity" "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz"
|
|
||||||
"version" "1.5.1"
|
|
||||||
|
|
||||||
"bl@^4.0.3":
|
|
||||||
"integrity" "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="
|
|
||||||
"resolved" "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz"
|
|
||||||
"version" "4.1.0"
|
|
||||||
dependencies:
|
|
||||||
"buffer" "^5.5.0"
|
|
||||||
"inherits" "^2.0.4"
|
|
||||||
"readable-stream" "^3.4.0"
|
|
||||||
|
|
||||||
"buffer@^5.5.0":
|
|
||||||
"integrity" "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz"
|
|
||||||
"version" "5.7.1"
|
|
||||||
dependencies:
|
|
||||||
"base64-js" "^1.3.1"
|
|
||||||
"ieee754" "^1.1.13"
|
|
||||||
|
|
||||||
"chownr@^1.1.1":
|
|
||||||
"integrity" "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz"
|
|
||||||
"version" "1.1.4"
|
|
||||||
|
|
||||||
"code-point-at@^1.0.0":
|
|
||||||
"integrity" "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz"
|
|
||||||
"version" "1.1.0"
|
|
||||||
|
|
||||||
"console-control-strings@^1.0.0", "console-control-strings@~1.1.0":
|
|
||||||
"integrity" "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz"
|
|
||||||
"version" "1.1.0"
|
|
||||||
|
|
||||||
"core-util-is@~1.0.0":
|
|
||||||
"integrity" "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz"
|
|
||||||
"version" "1.0.3"
|
|
||||||
|
|
||||||
"decompress-response@^4.2.0":
|
|
||||||
"integrity" "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz"
|
|
||||||
"version" "4.2.1"
|
|
||||||
dependencies:
|
|
||||||
"mimic-response" "^2.0.0"
|
|
||||||
|
|
||||||
"deep-extend@^0.6.0":
|
|
||||||
"integrity" "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz"
|
|
||||||
"version" "0.6.0"
|
|
||||||
|
|
||||||
"delegates@^1.0.0":
|
|
||||||
"integrity" "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz"
|
|
||||||
"version" "1.0.0"
|
|
||||||
|
|
||||||
"detect-libc@^1.0.3":
|
|
||||||
"integrity" "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz"
|
|
||||||
"version" "1.0.3"
|
|
||||||
|
|
||||||
"end-of-stream@^1.1.0", "end-of-stream@^1.4.1":
|
|
||||||
"integrity" "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q=="
|
|
||||||
"resolved" "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz"
|
|
||||||
"version" "1.4.4"
|
|
||||||
dependencies:
|
|
||||||
"once" "^1.4.0"
|
|
||||||
|
|
||||||
"expand-template@^2.0.3":
|
|
||||||
"integrity" "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz"
|
|
||||||
"version" "2.0.3"
|
|
||||||
|
|
||||||
"fs-constants@^1.0.0":
|
|
||||||
"integrity" "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
|
||||||
"resolved" "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz"
|
|
||||||
"version" "1.0.0"
|
|
||||||
|
|
||||||
"gauge@~2.7.3":
|
|
||||||
"integrity" "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz"
|
|
||||||
"version" "2.7.4"
|
|
||||||
dependencies:
|
|
||||||
"aproba" "^1.0.3"
|
|
||||||
"console-control-strings" "^1.0.0"
|
|
||||||
"has-unicode" "^2.0.0"
|
|
||||||
"object-assign" "^4.1.0"
|
|
||||||
"signal-exit" "^3.0.0"
|
|
||||||
"string-width" "^1.0.1"
|
|
||||||
"strip-ansi" "^3.0.1"
|
|
||||||
"wide-align" "^1.1.0"
|
|
||||||
|
|
||||||
"github-from-package@0.0.0":
|
|
||||||
"integrity" "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz"
|
|
||||||
"version" "0.0.0"
|
|
||||||
|
|
||||||
"has-unicode@^2.0.0":
|
|
||||||
"integrity" "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz"
|
|
||||||
"version" "2.0.1"
|
|
||||||
|
|
||||||
"ieee754@^1.1.13":
|
|
||||||
"integrity" "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz"
|
|
||||||
"version" "1.2.1"
|
|
||||||
|
|
||||||
"inherits@^2.0.3", "inherits@^2.0.4", "inherits@~2.0.3":
|
|
||||||
"integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
|
|
||||||
"version" "2.0.4"
|
|
||||||
|
|
||||||
"ini@~1.3.0":
|
|
||||||
"integrity" "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
|
||||||
"resolved" "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz"
|
|
||||||
"version" "1.3.8"
|
|
||||||
|
|
||||||
"is-fullwidth-code-point@^1.0.0":
|
|
||||||
"integrity" "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz"
|
|
||||||
"version" "1.0.0"
|
|
||||||
dependencies:
|
|
||||||
"number-is-nan" "^1.0.0"
|
|
||||||
|
|
||||||
"isarray@~1.0.0":
|
|
||||||
"integrity" "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
|
|
||||||
"version" "1.0.0"
|
|
||||||
|
|
||||||
"mimic-response@^2.0.0":
|
|
||||||
"integrity" "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz"
|
|
||||||
"version" "2.1.0"
|
|
||||||
|
|
||||||
"minimist@^1.2.0", "minimist@^1.2.3":
|
|
||||||
"integrity" "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
|
|
||||||
"resolved" "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz"
|
|
||||||
"version" "1.2.7"
|
|
||||||
|
|
||||||
"mkdirp-classic@^0.5.2", "mkdirp-classic@^0.5.3":
|
|
||||||
"integrity" "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
|
||||||
"resolved" "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz"
|
|
||||||
"version" "0.5.3"
|
|
||||||
|
|
||||||
"nan@^2.14.0", "nan@^2.14.2":
|
|
||||||
"integrity" "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz"
|
|
||||||
"version" "2.14.2"
|
|
||||||
|
|
||||||
"napi-build-utils@^1.0.1":
|
|
||||||
"integrity" "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz"
|
|
||||||
"version" "1.0.2"
|
|
||||||
|
|
||||||
"node-abi@^2.21.0":
|
|
||||||
"integrity" "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w=="
|
|
||||||
"resolved" "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz"
|
|
||||||
"version" "2.30.1"
|
|
||||||
dependencies:
|
|
||||||
"semver" "^5.4.1"
|
|
||||||
|
|
||||||
"npmlog@^4.0.1":
|
|
||||||
"integrity" "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz"
|
|
||||||
"version" "4.1.2"
|
|
||||||
dependencies:
|
|
||||||
"are-we-there-yet" "~1.1.2"
|
|
||||||
"console-control-strings" "~1.1.0"
|
|
||||||
"gauge" "~2.7.3"
|
|
||||||
"set-blocking" "~2.0.0"
|
|
||||||
|
|
||||||
"number-is-nan@^1.0.0":
|
|
||||||
"integrity" "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz"
|
|
||||||
"version" "1.0.1"
|
|
||||||
|
|
||||||
"object-assign@^4.1.0":
|
|
||||||
"integrity" "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"
|
|
||||||
"version" "4.1.1"
|
|
||||||
|
|
||||||
"once@^1.3.1", "once@^1.4.0":
|
|
||||||
"integrity" "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="
|
|
||||||
"resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
|
|
||||||
"version" "1.4.0"
|
|
||||||
dependencies:
|
|
||||||
"wrappy" "1"
|
|
||||||
|
|
||||||
"prebuild-install@^6.0.1":
|
|
||||||
"integrity" "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz"
|
|
||||||
"version" "6.1.4"
|
|
||||||
dependencies:
|
|
||||||
"detect-libc" "^1.0.3"
|
|
||||||
"expand-template" "^2.0.3"
|
|
||||||
"github-from-package" "0.0.0"
|
|
||||||
"minimist" "^1.2.3"
|
|
||||||
"mkdirp-classic" "^0.5.3"
|
|
||||||
"napi-build-utils" "^1.0.1"
|
|
||||||
"node-abi" "^2.21.0"
|
|
||||||
"npmlog" "^4.0.1"
|
|
||||||
"pump" "^3.0.0"
|
|
||||||
"rc" "^1.2.7"
|
|
||||||
"simple-get" "^3.0.3"
|
|
||||||
"tar-fs" "^2.0.0"
|
|
||||||
"tunnel-agent" "^0.6.0"
|
|
||||||
|
|
||||||
"process-nextick-args@~2.0.0":
|
|
||||||
"integrity" "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
|
||||||
"resolved" "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz"
|
|
||||||
"version" "2.0.1"
|
|
||||||
|
|
||||||
"pump@^3.0.0":
|
|
||||||
"integrity" "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww=="
|
|
||||||
"resolved" "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz"
|
|
||||||
"version" "3.0.0"
|
|
||||||
dependencies:
|
|
||||||
"end-of-stream" "^1.1.0"
|
|
||||||
"once" "^1.3.1"
|
|
||||||
|
|
||||||
"rc@^1.2.7":
|
|
||||||
"integrity" "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz"
|
|
||||||
"version" "1.2.8"
|
|
||||||
dependencies:
|
|
||||||
"deep-extend" "^0.6.0"
|
|
||||||
"ini" "~1.3.0"
|
|
||||||
"minimist" "^1.2.0"
|
|
||||||
"strip-json-comments" "~2.0.1"
|
|
||||||
|
|
||||||
"readable-stream@^2.0.6":
|
|
||||||
"integrity" "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz"
|
|
||||||
"version" "2.3.7"
|
|
||||||
dependencies:
|
|
||||||
"core-util-is" "~1.0.0"
|
|
||||||
"inherits" "~2.0.3"
|
|
||||||
"isarray" "~1.0.0"
|
|
||||||
"process-nextick-args" "~2.0.0"
|
|
||||||
"safe-buffer" "~5.1.1"
|
|
||||||
"string_decoder" "~1.1.1"
|
|
||||||
"util-deprecate" "~1.0.1"
|
|
||||||
|
|
||||||
"readable-stream@^3.1.1":
|
|
||||||
"integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz"
|
|
||||||
"version" "3.6.0"
|
|
||||||
dependencies:
|
|
||||||
"inherits" "^2.0.3"
|
|
||||||
"string_decoder" "^1.1.1"
|
|
||||||
"util-deprecate" "^1.0.1"
|
|
||||||
|
|
||||||
"readable-stream@^3.4.0":
|
|
||||||
"integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz"
|
|
||||||
"version" "3.6.0"
|
|
||||||
dependencies:
|
|
||||||
"inherits" "^2.0.3"
|
|
||||||
"string_decoder" "^1.1.1"
|
|
||||||
"util-deprecate" "^1.0.1"
|
|
||||||
|
|
||||||
"safe-buffer@^5.0.1", "safe-buffer@~5.1.0", "safe-buffer@~5.1.1":
|
|
||||||
"integrity" "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
|
||||||
"resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
|
|
||||||
"version" "5.1.2"
|
|
||||||
|
|
||||||
"semver@^5.4.1":
|
|
||||||
"integrity" "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
|
|
||||||
"version" "5.7.1"
|
|
||||||
|
|
||||||
"set-blocking@~2.0.0":
|
|
||||||
"integrity" "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz"
|
|
||||||
"version" "2.0.0"
|
|
||||||
|
|
||||||
"signal-exit@^3.0.0":
|
|
||||||
"integrity" "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
|
|
||||||
"version" "3.0.7"
|
|
||||||
|
|
||||||
"simple-concat@^1.0.0":
|
|
||||||
"integrity" "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
|
||||||
"resolved" "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz"
|
|
||||||
"version" "1.0.1"
|
|
||||||
|
|
||||||
"simple-get@^3.0.3":
|
|
||||||
"integrity" "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz"
|
|
||||||
"version" "3.1.1"
|
|
||||||
dependencies:
|
|
||||||
"decompress-response" "^4.2.0"
|
|
||||||
"once" "^1.3.1"
|
|
||||||
"simple-concat" "^1.0.0"
|
|
||||||
|
|
||||||
"string_decoder@^1.1.1", "string_decoder@~1.1.1":
|
|
||||||
"integrity" "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz"
|
|
||||||
"version" "1.1.1"
|
|
||||||
dependencies:
|
|
||||||
"safe-buffer" "~5.1.0"
|
|
||||||
|
|
||||||
"string-width@^1.0.1", "string-width@^1.0.2 || 2 || 3 || 4":
|
|
||||||
"integrity" "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz"
|
|
||||||
"version" "1.0.2"
|
|
||||||
dependencies:
|
|
||||||
"code-point-at" "^1.0.0"
|
|
||||||
"is-fullwidth-code-point" "^1.0.0"
|
|
||||||
"strip-ansi" "^3.0.0"
|
|
||||||
|
|
||||||
"strip-ansi@^3.0.0", "strip-ansi@^3.0.1":
|
|
||||||
"integrity" "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz"
|
|
||||||
"version" "3.0.1"
|
|
||||||
dependencies:
|
|
||||||
"ansi-regex" "^2.0.0"
|
|
||||||
|
|
||||||
"strip-json-comments@~2.0.1":
|
|
||||||
"integrity" "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz"
|
|
||||||
"version" "2.0.1"
|
|
||||||
|
|
||||||
"tar-fs@^2.0.0":
|
|
||||||
"integrity" "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng=="
|
|
||||||
"resolved" "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz"
|
|
||||||
"version" "2.1.1"
|
|
||||||
dependencies:
|
|
||||||
"chownr" "^1.1.1"
|
|
||||||
"mkdirp-classic" "^0.5.2"
|
|
||||||
"pump" "^3.0.0"
|
|
||||||
"tar-stream" "^2.1.4"
|
|
||||||
|
|
||||||
"tar-stream@^2.1.4":
|
|
||||||
"integrity" "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz"
|
|
||||||
"version" "2.2.0"
|
|
||||||
dependencies:
|
|
||||||
"bl" "^4.0.3"
|
|
||||||
"end-of-stream" "^1.4.1"
|
|
||||||
"fs-constants" "^1.0.0"
|
|
||||||
"inherits" "^2.0.3"
|
|
||||||
"readable-stream" "^3.1.1"
|
|
||||||
|
|
||||||
"tree-sitter-cli@^0.20.3":
|
|
||||||
"integrity" "sha512-MHABT8oCPr4D0fatsPo6ATQ9H4h9vHpPRjlxkxJs80tpfAEKGn6A1zU3eqfCKBcgmfZDe9CiL3rKOGMzYHwA3w=="
|
|
||||||
"resolved" "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.20.7.tgz"
|
|
||||||
"version" "0.20.7"
|
|
||||||
|
|
||||||
"tree-sitter@^0.20.0":
|
|
||||||
"integrity" "sha512-Cmb8V0ocamHbgWMVhZIa+78k/7r8VCQ6+ePG8eYEAO7AccwWi06Ct4ATNiI94KwhIkRl0+OwZ42/5nk3GnEMpQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.1.tgz"
|
|
||||||
"version" "0.20.1"
|
|
||||||
dependencies:
|
|
||||||
"nan" "^2.14.0"
|
|
||||||
"prebuild-install" "^6.0.1"
|
|
||||||
|
|
||||||
"tunnel-agent@^0.6.0":
|
|
||||||
"integrity" "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w=="
|
|
||||||
"resolved" "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz"
|
|
||||||
"version" "0.6.0"
|
|
||||||
dependencies:
|
|
||||||
"safe-buffer" "^5.0.1"
|
|
||||||
|
|
||||||
"util-deprecate@^1.0.1", "util-deprecate@~1.0.1":
|
|
||||||
"integrity" "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
|
||||||
"resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
|
|
||||||
"version" "1.0.2"
|
|
||||||
|
|
||||||
"wide-align@^1.1.0":
|
|
||||||
"integrity" "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg=="
|
|
||||||
"resolved" "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz"
|
|
||||||
"version" "1.1.5"
|
|
||||||
dependencies:
|
|
||||||
"string-width" "^1.0.2 || 2 || 3 || 4"
|
|
||||||
|
|
||||||
"wrappy@1":
|
|
||||||
"integrity" "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
|
||||||
"resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
|
|
||||||
"version" "1.0.2"
|
|
||||||
Loading…
Reference in New Issue