@codemirror/lang-python
Advanced tools
Comparing version 0.19.5 to 0.20.0
@@ -0,1 +1,7 @@ | ||
## 0.20.0 (2022-04-20) | ||
### Bug fixes | ||
Add folding information for set and tuple expressions. | ||
## 0.19.5 (2022-04-06) | ||
@@ -2,0 +8,0 @@ |
import { parser } from '@lezer/python'; | ||
import { LRLanguage, indentNodeProp, delimitedIndent, foldNodeProp, foldInside, LanguageSupport } from '@codemirror/language'; | ||
import { styleTags, tags } from '@codemirror/highlight'; | ||
@@ -57,36 +56,4 @@ function indentBody(context, node) { | ||
/*@__PURE__*/foldNodeProp.add({ | ||
"ArrayExpression DictionaryExpression": foldInside, | ||
"ArrayExpression DictionaryExpression SetExpression TupleExpression": foldInside, | ||
Body: (node, state) => ({ from: node.from + 1, to: node.to - (node.to == state.doc.length ? 0 : 1) }) | ||
}), | ||
/*@__PURE__*/styleTags({ | ||
"async \"*\" \"**\" FormatConversion FormatSpec": tags.modifier, | ||
"for while if elif else try except finally return raise break continue with pass assert await yield": tags.controlKeyword, | ||
"in not and or is del": tags.operatorKeyword, | ||
"from def class global nonlocal lambda": tags.definitionKeyword, | ||
import: tags.moduleKeyword, | ||
"with as print": tags.keyword, | ||
Boolean: tags.bool, | ||
None: tags.null, | ||
VariableName: tags.variableName, | ||
"CallExpression/VariableName": /*@__PURE__*/tags.function(tags.variableName), | ||
"FunctionDefinition/VariableName": /*@__PURE__*/tags.function(/*@__PURE__*/tags.definition(tags.variableName)), | ||
"ClassDefinition/VariableName": /*@__PURE__*/tags.definition(tags.className), | ||
PropertyName: tags.propertyName, | ||
"CallExpression/MemberExpression/PropertyName": /*@__PURE__*/tags.function(tags.propertyName), | ||
Comment: tags.lineComment, | ||
Number: tags.number, | ||
String: tags.string, | ||
FormatString: /*@__PURE__*/tags.special(tags.string), | ||
UpdateOp: tags.updateOperator, | ||
ArithOp: tags.arithmeticOperator, | ||
BitOp: tags.bitwiseOperator, | ||
CompareOp: tags.compareOperator, | ||
AssignOp: tags.definitionOperator, | ||
Ellipsis: tags.punctuation, | ||
At: tags.meta, | ||
"( )": tags.paren, | ||
"[ ]": tags.squareBracket, | ||
"{ }": tags.brace, | ||
".": tags.derefOperator, | ||
", ;": tags.separator | ||
}) | ||
@@ -93,0 +60,0 @@ ], |
{ | ||
"name": "@codemirror/lang-python", | ||
"version": "0.19.5", | ||
"version": "0.20.0", | ||
"description": "Python language support for the CodeMirror code editor", | ||
@@ -29,5 +29,4 @@ "scripts": { | ||
"dependencies": { | ||
"@codemirror/highlight": "^0.19.7", | ||
"@codemirror/language": "^0.19.0", | ||
"@lezer/python": "^0.15.0" | ||
"@codemirror/language": "^0.20.0", | ||
"@lezer/python": "^0.16.0" | ||
}, | ||
@@ -34,0 +33,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
2
13220
159
+ Added@codemirror/language@0.20.2(transitive)
+ Added@codemirror/state@0.20.1(transitive)
+ Added@codemirror/view@0.20.7(transitive)
+ Added@lezer/common@0.16.1(transitive)
+ Added@lezer/highlight@0.16.0(transitive)
+ Added@lezer/lr@0.16.3(transitive)
+ Added@lezer/python@0.16.1(transitive)
- Removed@codemirror/highlight@^0.19.7
- Removed@codemirror/highlight@0.19.8(transitive)
- Removed@codemirror/language@0.19.10(transitive)
- Removed@codemirror/rangeset@0.19.9(transitive)
- Removed@codemirror/state@0.19.9(transitive)
- Removed@codemirror/text@0.19.6(transitive)
- Removed@codemirror/view@0.19.48(transitive)
- Removed@lezer/common@0.15.12(transitive)
- Removed@lezer/lr@0.15.8(transitive)
- Removed@lezer/python@0.15.1(transitive)
Updated@codemirror/language@^0.20.0
Updated@lezer/python@^0.16.0