Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/lang-rust

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lang-rust - npm Package Compare versions

Comparing version 0.18.0 to 0.19.0

10

CHANGELOG.md

@@ -0,3 +1,13 @@

## 0.19.0 (2021-08-11)
### Breaking changes
Update dependencies to 0.19.0
## 0.18.0 (2021-03-03)
### Breaking changes
Update dependencies to 0.18.
## 0.17.1 (2021-01-06)

@@ -4,0 +14,0 @@

12

dist/index.d.ts

@@ -1,6 +0,14 @@

import { LezerLanguage, LanguageSupport } from '@codemirror/language';
import { LRLanguage, LanguageSupport } from '@codemirror/language';
declare const rustLanguage: LezerLanguage;
/**
A syntax provider based on the [Lezer Rust
parser](https://github.com/lezer-parser/rust), extended with
highlighting and indentation information.
*/
declare const rustLanguage: LRLanguage;
/**
Rust language support
*/
declare function rust(): LanguageSupport;
export { rust, rustLanguage };

40

dist/index.js

@@ -1,17 +0,19 @@

import { parser } from 'lezer-rust';
import { LezerLanguage, indentNodeProp, continuedIndent, foldNodeProp, foldInside, LanguageSupport } from '@codemirror/language';
import { parser } from '@lezer/rust';
import { LRLanguage, indentNodeProp, continuedIndent, foldNodeProp, foldInside, LanguageSupport } from '@codemirror/language';
import { styleTags, tags } from '@codemirror/highlight';
/// A syntax provider based on the [Lezer Rust
/// parser](https://github.com/lezer-parser/rust), extended with
/// highlighting and indentation information.
const rustLanguage = LezerLanguage.define({
parser: parser.configure({
/**
A syntax provider based on the [Lezer Rust
parser](https://github.com/lezer-parser/rust), extended with
highlighting and indentation information.
*/
const rustLanguage = /*@__PURE__*/LRLanguage.define({
parser: /*@__PURE__*/parser.configure({
props: [
indentNodeProp.add({
IfExpression: continuedIndent({ except: /^\s*({|else\b)/ }),
/*@__PURE__*/indentNodeProp.add({
IfExpression: /*@__PURE__*/continuedIndent({ except: /^\s*({|else\b)/ }),
"String BlockComment": () => -1,
"Statement MatchArm": continuedIndent()
"Statement MatchArm": /*@__PURE__*/continuedIndent()
}),
foldNodeProp.add(type => {
/*@__PURE__*/foldNodeProp.add(type => {
if (/(Block|edTokens|List)$/.test(type.name))

@@ -23,3 +25,3 @@ return foldInside;

}),
styleTags({
/*@__PURE__*/styleTags({
"const macro_rules mod struct union enum type fn impl trait let use crate static": tags.definitionKeyword,

@@ -32,11 +34,11 @@ "pub unsafe async mut extern default move": tags.modifier,

String: tags.string,
RawString: tags.special(tags.string),
RawString: /*@__PURE__*/tags.special(tags.string),
Boolean: tags.bool,
Identifier: tags.variableName,
"CallExpression/Identifier": tags.function(tags.variableName),
BoundIdentifier: tags.definition(tags.variableName),
"CallExpression/Identifier": /*@__PURE__*/tags.function(tags.variableName),
BoundIdentifier: /*@__PURE__*/tags.definition(tags.variableName),
LoopLabel: tags.labelName,
FieldIdentifier: tags.propertyName,
"CallExpression/FieldExpression/FieldIdentifier": tags.function(tags.propertyName),
Lifetime: tags.special(tags.variableName),
"CallExpression/FieldExpression/FieldIdentifier": /*@__PURE__*/tags.function(tags.propertyName),
Lifetime: /*@__PURE__*/tags.special(tags.variableName),
ScopeIdentifier: tags.namespace,

@@ -72,3 +74,5 @@ TypeIdentifier: tags.typeName,

});
/// Rust language support
/**
Rust language support
*/
function rust() {

@@ -75,0 +79,0 @@ return new LanguageSupport(rustLanguage);

{
"name": "@codemirror/lang-rust",
"version": "0.18.0",
"version": "0.19.0",
"description": "Rust language support for the CodeMirror code editor",
"scripts": {
"test": "echo 'No tests'",
"prepare": "tsc -p tsconfig.local.json && rollup -c"
"test": "cm-runtests",
"prepare": "cm-buildhelper src/rust.ts"
},

@@ -29,10 +29,8 @@ "keywords": [

"dependencies": {
"@codemirror/highlight": "^0.18.0",
"@codemirror/language": "^0.18.0",
"lezer-rust": "^0.13.0"
"@codemirror/highlight": "^0.19.0",
"@codemirror/language": "^0.19.0",
"@lezer/rust": "^0.14.0"
},
"devDependencies": {
"rollup": "^2.35.1",
"rollup-plugin-dts": "^2.0.1",
"typescript": "^4.1.3"
"@codemirror/buildhelper": "^0.1.0"
},

@@ -39,0 +37,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc