Skip to content

cbml/cbmljs

Repository files navigation

NPM version Build Status Coverage Status

CBML Parser

Struct

cbml

{
    "type": "block", // token type : "text" | "block" | "single"
    "pos": 7, // Starting position
    "endpos": 333, // End position
    "value": "/*<jdists>*/.../*</jdists>*/", // All value // as "{{prefix}}" + "{{content}}" + "{{suffix}}"
    "tag": "jdists", // tag name
    "language": "c", // language : "c" | "pascal" | "python" | "lua"
    "attrs": {},
	"line": 1, // Line Numbers
	"col": 8 // Column number
    "nodes": [
       ...
    ],
	"content": "...",
	"prefix": "/*<jdists>*/",
	"suffix": "/*</jdists>*/"
}

Install

$ npm install --save cbml

Usage

var cbml = require('cbml');

console.log(cbml.parse('/*<hello />*/'));
$ npm install --global cbml
$ cbml --help

License

MIT © zswang

Releases

No releases published

Packages

No packages published