SweetSyntax is a powerful YAML-based generic parser and AST explorer for analyzing programming languages.
Written in Nim, it provides a flexible foundation for building high-level parsers, syntax highlighters, domain-specific languages, bundlers, minifiers, obfuscators, linters, or any sweet tool that requires a structured representation of source code.
Exports
-
rust, featRegex, SweetFilter, InfixEntry, Definition, PostfixGroup, java, parseHook, ts, parseHook, TernaryDef, liquid, StatementsSpec, SweetLexerInit, json, featGenerators, go, SweetSpec, d, Pattern, html, handlebars, featArrowFn, KeywordScopes, Assoc, IdentsTable, ruby, systemd, c, php, kotlin, ocaml, swift, AstNode, md, knownSyntaxTable, csharp, InfixGroup, AssocKind, yaml, jinja2, Definitions, csv, shell, cpp, newSyntax, OperatorsSpec, ejs, SymbolsTable, perl, make, parseHook, assocRight, KnownSyntax, docker, py, parseHook, haskell, nginx, toml, featTemplateLit, parseHook, zig, assocLeft, js, PrefixGroup, objc, StatementSpec, FeaturesSpec, leftAssoc, featAdjacentConcat, featAsync, css, crystal, featLabeledStmt, lua, rightAssoc, ini, xml, featCommandSyntax, SweetSyntax, nim, BlocksSpec, parseHook, getKnownSyntax, cmake, AssignmentDef, LanguageFeature, getFullInput, getLexeme, charAt, SweetLexer, tkInt, tkRegex, getTokenValue, tkDocComment, SweetTokenKind, getToken, initLexerFromFile, SweetLexerError, Token, tkFloat, tkIdentifier, tkChar, initLexer, initLexerFromFile, getContext, closeLexer, resetLexer, restoreLexer, initLexer, initLexerFromMemFile, tkString, markLexer, LexerMark, tkComment, tkPunct, newInlineComment, add, stampFrom, newIdent, Node, dumpTree, newEmptyNode, dumpTree, LeafNodes, newNode, pairs, []=, newPostfix, items, newFunction, newIdent, newBlockNode, newFunction, add, len, stamp, stamp, NodeKind, newNode, treeRepr, OpenAstProgram, [], newDocComment, [], PrefixHandler, parseCommentGeneric, walkOpt, parseIndentBlock, exprHandler, expect, applyPrecompiled, parseArrayLiteral, parseStatement, compile, stampMissing, parseHexFloat, stmtHandler, walk, OpenAstParsingError, prefixHandler, expectWalk, error, ParsingCallback, parseScript, parseBlock, parseExpression, StmtHandler, parseGroupExpr, parseObjectLiteral, GenericParser, parseCommaExpr, ExpressionHandler, syntaxForExt, HighlightFormat, syntaxForFilename, highlight, SweetHighlightError, highlightFile