0.5.10 • Published 8 months ago

bq2cst v0.5.10

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

bq2cst

Parse GoogleSQL, which is a dialect of BigQuery, into a concrete syntax tree.

!WARNING This parser is designed to be used via prettier-plugin-bq.

Features

  • forcused on GoogleSQL (in other words, other SQL dialects are out of scope)
  • developed in Rust, using wasm-pack

Install

npm install bq2cst

Usage

const parser = require("bq2cst");
parser.parse("SELECT 1;")

//[
//  {
//    "token": {
//      "line":1,
//      "column":1,
//      "literal":"SELECT"
//    },
//    "node_type":"SelectStatement",
//    "children":{
//      "semicolon":{
//        "Node":{
//          "token":{"line":1,"column":9,"literal":";"},
//          "node_type":"Symbol",
//          "children":{}
//        }
//      },
//      "exprs":{
//        "NodeVec":[{
//          "token":{"line":1,"column":8,"literal":"1"},
//          "node_type":"NumericLiteral",
//          "children":{}
//        }]
//      }
//    }
//  },
//  {
//    "token":null,
//    "node_type":"EOF",
//    "children":{}
//  }
//]
0.5.10

8 months ago

0.5.9

10 months ago

0.5.8

1 year ago

0.5.7

1 year ago

0.5.6

1 year ago

0.5.5

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.31

2 years ago

0.4.32

2 years ago

0.4.30

2 years ago

0.4.28

2 years ago

0.4.29

2 years ago

0.4.27

2 years ago

0.4.26

2 years ago

0.4.25

2 years ago