Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generate an AST of a BBCode fragment.

License

NotificationsYou must be signed in to change notification settings

PythonCoderAS/bbcode-ast

Repository files navigation

Generates an Abstract Syntax Tree (AST) from a chunk of BBCode.

Read full and updated documentation:https://pythoncoderas.github.io/bbcode-ast/

Installation

Node.js

npm install --save bbcode-ast

Browser

Load the library fromhttps://cdn.jsdelivr.net/npm/bbcode-ast@2/dist/bundle.min.js.

This will add abbcode_ast variable to thewindow global. The default parser can be accessed throughbbcode_ast.default.

Usage

You can either use the default parser or construct your own parser. Once you have aParser, call theparse method onit. The default parser can be imported.

It will return the root node of the AST.

You can navigate through the tree by accessing thechildren attribute of the root node and recursively inspectingthechildren of child nodes.

About

Generate an AST of a BBCode fragment.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp