Scan your whole stack
Are you using @exercism/codemirror-lang-prolog?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.1
@exercism/codemirror-lang-prolog was last scanned on 29 Nov 2026 at version 1.0.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.1 LATEST | 29 Nov 2026 | No rules fired |
| 1.0.0 | 29 Nov 2026 | No rules fired |
| 0.0.0-stage | 29 Nov 2026 | Not shown |
Findings for v1.0.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
SWI-Prolog language support for CodeMirror 6: a Lezer parser for SWI-Prolog 7+ syntax, with highlighting, indentation, folding and completion. Exercism uses it in the Prolog editor on exercism.org.
npm install @exercism/codemirror-lang-prolog
import {EditorView, basicSetup} from "codemirror"
import {prolog} from "@exercism/codemirror-lang-prolog"
new EditorView({extensions: [basicSetup, prolog()], parent: document.body})
prolog() returns the LanguageSupport; prologLanguage is the LRLanguage.
prolog() adds prologCompletion as the language's completion source. It offers:
_.name/N, and DCG nonterminals as name//N.lists,
apply, aggregate, pairs, clpfd and others) with their arity, and the
alphanumeric operators such as is and mod.findall, forall, format, maplist and catch inside
a clause.It offers nothing inside comments, strings or quoted atoms. clauseSnippets,
goalSnippets and globalOptions are exported for use in other completion sources.
The operator and built-in tables come from SWI-Prolog 10.0.2 (see spec/prolog/SOURCE
in the repository).
Operators are not parsed. Prolog programs change the operator table at run time with
op/3, so no fixed grammar can build the right term for every program. This parser
reads tokens and the structure that does not depend on operators: clauses and their
end, the neck (:-, -->), compound terms, lists, curly terms, dicts and parentheses.
Between those, terms are flat sequences: X is A + B is Variable Operator Variable SymbolAtom Variable. Operators declared in the edited file still tokenise; they are
just not highlighted as operators.
Each clause is a Directive, Rule or Fact ending in End. The name of a clause's
head is in HeadFunctor (after an optional Module:), the name of every other compound
in Functor, followed by ArgList. Names are told apart by the tables: Operator
(alphanumeric operators such as is, mod), Control (->, \+, call, true,
...), DirectiveName (dynamic, use_module, ...), Builtin (other built-in
predicates, by name only), and plain Atom. f( is a compound and t{ a dict, f (
and t { are not, as in SWI-Prolog. Block comments nest, as in SWI-Prolog.
The parser is more lenient than SWI-Prolog: it accepts some input that SWI-Prolog
rejects (X(a), digits out of range for their radix, unknown escapes). It only
recognises ASCII digits in numbers, and a digit group split by a comment
(1_000_/*c*/000) is not one number to it.
The tests check every token class and clause kind, and parse the .pl files of
SWI-Prolog's own library: each file that SWI-Prolog's reader accepts must parse without
error nodes and into as many clauses as SWI-Prolog reads terms. Exceptions are listed in
test/KNOWN.md.
From the root of the repository, run pnpm install (which also builds the package into
dist/), then pnpm -r run build to rebuild it and pnpm -r test to run the tests.
Generated by pnpm generate (gen/tables.mjs in the repository) from a run of the
pinned swipl: src/tables.ts, and in the repository spec/prolog/ops.json,
spec/prolog/builtins.json and spec/prolog/SOURCE.
Hand-written: src/prolog.grammar, src/tokens.js (the tokenizer for names, symbol
characters, clause ends, nested comments and quasi-quotations), src/highlight.ts,
src/index.ts, the tests, and in the repository spec/prolog/control.json (the control
constructs and directive names, which pnpm generate checks against the generated
tables) and tools/.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.