CBML Parser
{
"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>*/"
}
$ npm install --save cbml
var cbml = require('cbml');
console.log(cbml.parse('/*<hello />*/'));
$ npm install --global cbml
$ cbml --help
MIT © zswang