
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@artemis-lang/parser
Advanced tools
Syntax parser and Abstract Syntax Tree (AST) generator for the Artemis programming language.
npm install @artemis-lang/parser
import Parser from '@artemis-lang/parser';
import Lexer from '@artemis-lang/lexer';
const code = '(def x 42)';
const lexer = new Lexer(code);
const tokens = lexer.tokenize();
const parser = new Parser(tokens);
const ast = parser.parse();
console.log(ast);
[1, 2, 3]{key: value}#[1, 2, 3](def name value)(fn name [params] (body))(functionName args)(if (condition) (then) (else))(match value { pattern : action })(while (condition) (body))(for [var start end step] (body))(+ a b), (* x y)(! value), (~ bits)(> a b), (== x y)(&& a b), (|| x y)(return value)(js $ code $)(get object "property")The parser generates nodes with the following types:
Program: Root nodeVariableDefinition: Variable declarationsFunctionDefinition: Function declarationsFunctionCall: Function invocationsIf: If statementsWhile: While loopsFor: For loopsMatch: Pattern matchingReturn: Return statementsBinaryExpression: Binary operationsUnaryExpression: Unary operationsLiteral: Literal values (number, string, boolean)List: Array literalsMap: Object literalsSet: Set literalsimport Parser from '@artemis-lang/parser';
import Lexer from '@artemis-lang/lexer';
const code = `
(fn factorial [n] (
(if ((== n 0)) (
(return 1)
)(
(return (* n (factorial (- n 1))))
))
))
`;
const lexer = new Lexer(code);
const tokens = lexer.tokenize();
const parser = new Parser(tokens);
const ast = parser.parse();
console.log(JSON.stringify(ast, null, 2));
Current version: 0.3.4
nextBy() methodFor complete language documentation, see the main README.
FAQs
The artemis language parser
We found that @artemis-lang/parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.