A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/codemirror-lang-circom below:

codemirror-lang-circom - npm

codemirror-lang-circom

A Codemirror language extension for circom.

⚠️ This extension is very rough alpha-quality! There are almost certainly bugs.

Table of Contents Install
npm i codemirror-lang-circom
Usage
import { EditorState } from "@codemirror/state"
import { EditorView } from "@codemirror/view"

import { circomLanguage } from "codemirror-lang-circom"

import { basicSetup } from "@codemirror/basic-setup"
import { defaultHighlightStyle } from "@codemirror/highlight"
import { keymap } from "@codemirror/view"
import { defaultKeymap } from "@codemirror/commands"

const view = new EditorView({
	state: EditorState.create({
		extensions: [
			circomLanguage,
			basicSetup,
			defaultHighlightStyle,
			keymap.of(defaultKeymap),
		],
	}),
	parent: document.querySelector("#editor"),
})

You can find documentation for the LR parser interface on the Lezer website.

API
import type { LRLanguage } from "@codemirror/language"

export const circomLanguage: LRLanguage
Contributing

This is still under active development so I'm probably not interested in issues or PRs until it stabilizes a little.

License

GPLv3 © 2021 Joel Gustafson


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4