diff --git a/src/main/grammars/MoveParser.bnf b/src/main/grammars/MoveParser.bnf index 7c1872bd0..22eee3f8d 100644 --- a/src/main/grammars/MoveParser.bnf +++ b/src/main/grammars/MoveParser.bnf @@ -187,25 +187,30 @@ AttrItemInitializer ::= '=' Expr { pin = 1 } NamedAddressDef ::= address IDENTIFIER '=' AddressRef ';' { pin = 3 } -Script ::= SCRIPT_KW ScriptBlock { pin = 1 } -ScriptBlock ::= '{' ScriptBlockItems '}' { +Script ::= SCRIPT_KW '{' ScriptItem_with_recover* '}' +{ pin = 1 implements = [ "org.move.lang.core.psi.ext.MvItemsOwner" ] } -private ScriptBlockItems ::= ScriptItem* +ScriptBlock ::= '{' ScriptItem_with_recover* '}' { +// pin = 1 +// implements = [ +// "org.move.lang.core.psi.ext.MvItemsOwner" +// ] +} -private ScriptItem ::= !('}' | <>) ScriptItem_item +private ScriptItem_with_recover ::= !('}' | <>) ScriptItem { pin = 1 recoverWhile = ScriptItem_recover } // top-level recovery -private ScriptItemFirst ::= use | CONST_KW | fun -private ScriptItem_recover ::= !('}' | <> | ScriptItemFirst) +private ScriptItem_recover ::= !('}' | ScriptItem_first) +private ScriptItem_first ::= use | CONST_KW | fun -private ScriptItem_item ::= UseStmt | Const | FunctionInner +private ScriptItem ::= UseStmt | Const | FunctionInner private address ::= <> private has ::= <> @@ -228,7 +233,7 @@ private AddressBlockItems ::= Module* } private AddressBlockItems_recover ::= !'}' -Module ::= Attr* MODULE_KW (AddressRef '::')? IDENTIFIER ModuleBlock +Module ::= Attr* MODULE_KW (AddressRef '::')? IDENTIFIER '{' ModuleItem_with_recover* '}' { pin = "MODULE_KW" name = "module declaration" @@ -236,6 +241,7 @@ Module ::= Attr* MODULE_KW (AddressRef '::')? IDENTIFIER ModuleBlock "org.move.lang.core.psi.MvQualNamedElement" "org.move.lang.core.psi.MvNameIdentifierOwner" "org.move.lang.core.psi.ext.MvDocAndAttributeOwner" + "org.move.lang.core.psi.ext.MvItemsOwner" ] mixin = "org.move.lang.core.psi.ext.MvModuleMixin" stubClass = "org.move.lang.core.stubs.MvModuleStub" @@ -243,34 +249,33 @@ Module ::= Attr* MODULE_KW (AddressRef '::')? IDENTIFIER ModuleBlock hooks = [ leftBinder = "ADJACENT_LINE_COMMENTS" ] } -ModuleBlock ::= '{' ModuleBlockItems '}' +ModuleBlock ::= '{' ModuleItem_with_recover* '}' { pin = 1 implements = [ "org.move.lang.core.psi.ext.MvItemsOwner" ] } -private ModuleBlockItems ::= ModuleItem* -private ModuleItem ::= !('}' | <>) ModuleItem_item +private ModuleItem_with_recover ::= !('}' | <>) ModuleItem { pin = 1 - recoverWhile = Item_recover + recoverWhile = ModuleItem_recover } +private ModuleItem_recover ::= !('}' | ModuleItem_first) // top-level recovery -private Item_first ::= use | public | native | fun | CONST_KW | STRUCT_KW | spec | '#' - | "friend" | "entry" | "inline" | "enum" -private Item_recover ::= !('}' | <> | Item_first) - -private ModuleItem_item ::= UseStmt - | FriendDecl - | StructItem - | Enum - | FunctionItem - | SpecFunctionItem - | Const - | Schema - | ModuleItemSpec - | ItemSpec +private ModuleItem_first ::= use | public | native | fun | CONST_KW | STRUCT_KW | spec + | Attr_first | "friend" | "entry" | "inline" | "enum" + +private ModuleItem ::= UseStmt + | FriendDecl + | StructItem + | Enum + | FunctionItem + | SpecFunctionItem + | Const + | Schema + | ModuleItemSpec + | ItemSpec Const ::= Attr* CONST_KW IDENTIFIER TypeAnnotation Initializer ';' { @@ -464,7 +469,7 @@ private FunctionSignatureInner ::= IDENTIFIER TypeParameterList? { recoverWhile = "FunctionSignatureInner_recover" } -private FunctionSignatureInner_recover ::= !('{' | '}' | ';' | <> | Item_first) +private FunctionSignatureInner_recover ::= !('{' | '}' | ';' | <> | ModuleItem_first) private friend ::= <> private enum ::= <> @@ -683,28 +688,33 @@ BindingPat ::= IDENTIFIER !'::' { mixin = "org.move.lang.core.psi.ext.MvBindingPatMixin" } -TuplePat ::= '(' <>? ')' +TuplePat ::= '(' ParenListElemPat_with_recover* ')' +private ParenListElemPat_with_recover ::= !')' Pat (',' | &')') { + pin = 1 + recoverWhile = ParenListElemPat_recover +} +private ParenListElemPat_recover ::= !(')' | Pat_first) -StructPat ::= PathImpl StructPatFieldsBlock -StructPatFieldsBlock ::= '{' StructPatField_with_recover* '}' +StructPat ::= PathImpl '{' FieldPat_with_recover* '}' +//StructPatFieldsBlock ::= '{' FieldPat_with_recover* '}' -private StructPatField_with_recover ::= !'}' StructPatField (',' | &'}') +private FieldPat_with_recover ::= !'}' FieldPat (',' | &'}') { pin = 1 - recoverWhile = StructPatField_recover + recoverWhile = FieldPat_recover } -private StructPatField_recover ::= !('}' | IDENTIFIER) +private FieldPat_recover ::= !('}' | IDENTIFIER) -StructPatField ::= (BindingPat !':') | (IDENTIFIER StructPatFieldBinding) +FieldPat ::= (BindingPat !':') | (IDENTIFIER FieldPatBinding) { implements = [ "org.move.lang.core.resolve.ref.MvStructPatFieldReferenceElement" - "org.move.lang.core.psi.ext.MvStructRefField" + "org.move.lang.core.psi.ext.MvFieldRef" ] - mixin = "org.move.lang.core.psi.ext.MvStructPatFieldMixin" + mixin = "org.move.lang.core.psi.ext.MvFieldPatMixin" } -StructPatFieldBinding ::= ':' Pat +FieldPatBinding ::= ':' Pat private Pat_first ::= '_' | '(' | Path_first | AnyLitToken_first @@ -950,7 +960,7 @@ StructLitField ::= IDENTIFIER StructLitFieldInit? { implements = [ "org.move.lang.core.resolve.ref.MvStructFieldLitReferenceElement" - "org.move.lang.core.psi.ext.MvStructRefField" + "org.move.lang.core.psi.ext.MvFieldRef" ] mixin = "org.move.lang.core.psi.ext.MvStructLitFieldMixin" } diff --git a/src/main/kotlin/org/move/ide/annotator/HighlightingAnnotator.kt b/src/main/kotlin/org/move/ide/annotator/HighlightingAnnotator.kt index 59fbc7a31..6ddc378ef 100644 --- a/src/main/kotlin/org/move/ide/annotator/HighlightingAnnotator.kt +++ b/src/main/kotlin/org/move/ide/annotator/HighlightingAnnotator.kt @@ -74,7 +74,7 @@ class HighlightingAnnotator: MvAnnotatorBase() { if (element is MvNamedFieldDecl) return MvColor.FIELD if (element is MvStructDotField) return MvColor.FIELD if (element is MvMethodCall) return MvColor.METHOD_CALL - if (element is MvStructPatField) return MvColor.FIELD + if (element is MvFieldPat) return MvColor.FIELD if (element is MvStructLitField) return MvColor.FIELD if (element is MvConst) return MvColor.CONSTANT if (element is MvModule) return MvColor.MODULE diff --git a/src/main/kotlin/org/move/ide/annotator/MvErrorAnnotator.kt b/src/main/kotlin/org/move/ide/annotator/MvErrorAnnotator.kt index 1babfd7b2..8bd52845e 100644 --- a/src/main/kotlin/org/move/ide/annotator/MvErrorAnnotator.kt +++ b/src/main/kotlin/org/move/ide/annotator/MvErrorAnnotator.kt @@ -135,7 +135,7 @@ class MvErrorAnnotator: MvAnnotatorBase() { override fun visitStructPat(o: MvStructPat) { val nameElement = o.path.referenceNameElement ?: return val refStruct = o.path.maybeStruct ?: return - val fieldNames = o.patFields.map { it.referenceName } + val fieldNames = o.fieldPatList.map { it.referenceName } checkMissingFields( moveHolder, nameElement, fieldNames.toSet(), refStruct ) @@ -183,10 +183,10 @@ class MvErrorAnnotator: MvAnnotatorBase() { } private fun checkConstDef(holder: MvAnnotationHolder, const: MvConst) { - val owner = const.parent?.parent ?: return + val owner = const.parent ?: return val allConsts = when (owner) { - is MvModule -> owner.consts() - is MvScript -> owner.consts() + is MvModule -> owner.constList + is MvScript -> owner.constList else -> return } checkDuplicates(holder, const, allConsts.asSequence()) @@ -372,9 +372,7 @@ private fun checkFunctionDuplicates( ) { val fnName = fn.name ?: return val functions = - fn.module?.allFunctions() - ?: fn.script?.allFunctions() - ?: emptyList() + fn.module?.allFunctions() ?: fn.script?.functionList ?: emptyList() val duplicateFunctions = getDuplicates(functions.asSequence()) if (fnName !in duplicateFunctions.map { it.name }) { diff --git a/src/main/kotlin/org/move/ide/folding/MvFoldingBuilder.kt b/src/main/kotlin/org/move/ide/folding/MvFoldingBuilder.kt index 7d0e799e4..ebca875be 100644 --- a/src/main/kotlin/org/move/ide/folding/MvFoldingBuilder.kt +++ b/src/main/kotlin/org/move/ide/folding/MvFoldingBuilder.kt @@ -64,8 +64,9 @@ class MvFoldingBuilder: CustomFoldingBuilder(), DumbAware { ): MvVisitor() { override fun visitCodeBlock(o: MvCodeBlock) = fold(o) - override fun visitScriptBlock(o: MvScriptBlock) = fold(o) - override fun visitModuleBlock(o: MvModuleBlock) = fold(o) + + override fun visitModule(o: MvModule) = foldBetween(o, o.lBrace, o.rBrace) + override fun visitScript(o: MvScript) = foldBetween(o, o.lBrace, o.rBrace) override fun visitSpecCodeBlock(block: MvSpecCodeBlock) { if (block.children.isNotEmpty()) { @@ -83,16 +84,18 @@ class MvFoldingBuilder: CustomFoldingBuilder(), DumbAware { } override fun visitFunctionParameterList(o: MvFunctionParameterList) { - if (o.functionParameterList.isNotEmpty()) - fold(o) + if (o.functionParameterList.isEmpty()) return + fold(o) } - override fun visitBlockFields(o: MvBlockFields) { - if (o.namedFieldDeclList.isNotEmpty()) - fold(o) - } + override fun visitBlockFields(o: MvBlockFields) = fold(o) + override fun visitEnumBody(o: MvEnumBody) = fold(o) + override fun visitMatchBody(o: MvMatchBody) = fold(o) + override fun visitStructLitFieldsBlock(o: MvStructLitFieldsBlock) = fold(o) override fun visitUseStmt(o: MvUseStmt) = foldRepeatingItems(o, o.use, o.use, usesRanges) + override fun visitUseGroup(o: MvUseGroup) = fold(o) + override fun visitConst(o: MvConst) = foldRepeatingItems(o, o.constKw, o.constKw, constRanges) private fun fold(element: PsiElement) { diff --git a/src/main/kotlin/org/move/ide/formatter/MoveFmtBlock.kt b/src/main/kotlin/org/move/ide/formatter/MoveFmtBlock.kt index 5754f80dc..721dd1e9f 100644 --- a/src/main/kotlin/org/move/ide/formatter/MoveFmtBlock.kt +++ b/src/main/kotlin/org/move/ide/formatter/MoveFmtBlock.kt @@ -3,6 +3,7 @@ package org.move.ide.formatter import com.intellij.formatting.* import com.intellij.lang.ASTNode import com.intellij.psi.formatter.common.AbstractBlock +import org.move.ide.formatter.blocks.SyntheticRsFmtBlock import org.move.ide.formatter.impl.* import org.move.lang.MvElementTypes.* @@ -10,45 +11,57 @@ private fun ASTNode.isLeafNode(): Boolean = this.firstChildNode == null // every node in the formatter is wrapped in this block, formatting applied to blocks class MoveFmtBlock( - val blockNode: ASTNode, - val blockWrap: Wrap?, - val blockAlignment: Alignment?, - val blockIndent: Indent?, - val blockCtx: MvFmtContext, - val blockName: String, -) : AbstractBlock(blockNode, blockWrap, blockAlignment) { + private val node: ASTNode, + private val wrap: Wrap?, + private val alignment: Alignment?, + private val indent: Indent?, + val ctx: MvFmtContext, + private val debugName: String, +) : AbstractBlock(node, wrap, alignment) { override fun isLeaf(): Boolean = node.isLeafNode() - override fun getIndent(): Indent? = blockIndent + override fun getIndent(): Indent? = indent - override fun getSpacing(child1: Block?, child2: Block): Spacing? = computeSpacing(child1, child2, blockCtx) + override fun getSpacing(child1: Block?, child2: Block): Spacing? = computeSpacing(child1, child2, ctx) private val mySubBlocks: List by lazy { buildChildren() } override fun getSubBlocks(): List = mySubBlocks - override fun getDebugName() = blockName - override fun buildChildren(): List { val parentType = node.elementType val childAlignment = when (parentType) { // new alignment FUNCTION_PARAMETER_LIST -> Alignment.createAlignment() // aligned with parent - FUNCTION_PARAMETER -> blockCtx.sharedAlignment + FUNCTION_PARAMETER -> ctx.sharedAlignment + DOT_EXPR -> + if (node.treeParent.elementType == DOT_EXPR) + ctx.sharedAlignment + else + Alignment.createAlignment() else -> null } + + var metLBrace = false val alignment = getAlignmentStrategy() val noneWrap = Wrap.createWrap(WrapType.NONE, false) val chopListWrap = Wrap.createWrap(WrapType.CHOP_DOWN_IF_LONG, true) - return node.getChildren(null) + val children = node.getChildren(null) .filter { !it.isWhitespaceOrEmpty() } .map { childNode -> + if (node.isFlatBlock && childNode.isBlockDelim(node)) { + metLBrace = true + } + val childType = childNode.elementType - val childCtx = blockCtx.copy(sharedAlignment = childAlignment) - val indent = computeChildIndent(childNode) + val childCtx = ctx.copy( + metLBrace = metLBrace, + sharedAlignment = childAlignment + ) + val indent = computeIndent(childNode, childCtx) val isLeaf = childNode.isLeafNode() val childWrap = when { @@ -61,28 +74,61 @@ class MoveFmtBlock( } MoveFmtBlock( - blockNode = childNode, - blockWrap = childWrap, - blockAlignment = alignment.getAlignment(childNode, node, childCtx), - blockIndent = indent, - blockCtx = childCtx, - blockName = "${if (isLeaf) "LeafBlock" else "NodeBlock"}[$childType]" + node = childNode, + wrap = childWrap, + alignment = alignment.getAlignment(childNode, node, childCtx), + indent = indent, + ctx = childCtx, + debugName = "${if (isLeaf) "LeafBlock" else "NodeBlock"}[$childType]" ) } + + // Create fake `.sth` block here, so child indentation will + // be relative to it when it starts from new line. + // In other words: foo().bar().baz() => foo().baz()[.baz()] + // We are using dot as our representative. + // The idea is nearly copy-pasted from Kotlin's formatter. + if (node.elementType == DOT_EXPR) { + val dotIndex = children.indexOfFirst { it.node.elementType == DOT } + if (dotIndex != -1) { + val dotBlock = children[dotIndex] + val syntheticBlock = SyntheticRsFmtBlock( + representative = dotBlock, + subBlocks = children.subList(dotIndex, children.size), + ctx = ctx) + return children.subList(0, dotIndex).plusElement(syntheticBlock) + } + } + return children } // automatic indentation on typing, see sdk docs override fun getChildAttributes(newChildIndex: Int): ChildAttributes { - val indent = when (node.elementType) { - ADDRESS_BLOCK -> Indent.getNoneIndent() + val indent = when { + // Flat brace blocks do not have separate PSI node for content blocks + // so we have to manually decide whether new child is before (no indent) + // or after (normal indent) left brace node. + node.isFlatBraceBlock -> { + val lbraceIndex = subBlocks.indexOfFirst { it is ASTBlock && it.node?.elementType == L_BRACE } + if (lbraceIndex != -1 && lbraceIndex < newChildIndex) { + Indent.getNormalIndent() + } else { + Indent.getNoneIndent() + } + } + + node.elementType == ADDRESS_BLOCK -> Indent.getNoneIndent() // We are inside some kind of {...}, [...], (...) or <...> block // node.isDelimitedBlock -> Indent.getNormalIndent() - in DELIMITED_BLOCKS -> Indent.getNormalIndent() + node.elementType in DELIMITED_BLOCKS -> Indent.getNormalIndent() // Otherwise we don't want any indentation (null means continuation indent) else -> Indent.getNoneIndent() } return ChildAttributes(indent, null) } + + override fun getDebugName() = debugName + override fun toString() = "${node.text} $textRange" } diff --git a/src/main/kotlin/org/move/ide/formatter/MvFmtContext.kt b/src/main/kotlin/org/move/ide/formatter/MvFmtContext.kt index ba67e01d1..28d8cae03 100644 --- a/src/main/kotlin/org/move/ide/formatter/MvFmtContext.kt +++ b/src/main/kotlin/org/move/ide/formatter/MvFmtContext.kt @@ -10,7 +10,22 @@ import org.move.lang.MoveLanguage data class MvFmtContext( val commonSettings: CommonCodeStyleSettings, val spacingBuilder: SpacingBuilder, + /** + * Stores shared alignment object, e.g. for function declarations's parameters, return type & where clause. + */ val sharedAlignment: Alignment? = null, + + /** + * Determine whether we have spotted opening delimiter during + * construction of a _flat block_'s sub blocks list. + * + * We only care about opening delimiters (`(`, `[`, `{`, `<`, `|`) here, + * because none of flat blocks has any children after block part (apart + * from closing delimiter, which we have to handle separately anyways). + * + * @see isFlatBlock + */ + val metLBrace: Boolean = false ) { companion object { fun create(settings: CodeStyleSettings): MvFmtContext { @@ -18,9 +33,7 @@ data class MvFmtContext( return MvFmtContext( commonSettings = commonSettings, spacingBuilder = createSpacingBuilder(commonSettings), - sharedAlignment = null ) } } - } diff --git a/src/main/kotlin/org/move/ide/formatter/MvFormattingModelBuilder.kt b/src/main/kotlin/org/move/ide/formatter/MvFormattingModelBuilder.kt index f578a7c8c..13a0c4df9 100644 --- a/src/main/kotlin/org/move/ide/formatter/MvFormattingModelBuilder.kt +++ b/src/main/kotlin/org/move/ide/formatter/MvFormattingModelBuilder.kt @@ -11,7 +11,7 @@ class MvFormattingModelBuilder : FormattingModelBuilder { null, Indent.getNoneIndent(), MvFmtContext.create(formattingContext.codeStyleSettings), - blockName = "FileBlock" + debugName = "FileBlock" ) return FormattingModelProvider.createFormattingModelForPsiFile( formattingContext.containingFile, diff --git a/src/main/kotlin/org/move/ide/formatter/blocks/SyntheticRsFmtBlock.kt b/src/main/kotlin/org/move/ide/formatter/blocks/SyntheticRsFmtBlock.kt new file mode 100644 index 000000000..334909db9 --- /dev/null +++ b/src/main/kotlin/org/move/ide/formatter/blocks/SyntheticRsFmtBlock.kt @@ -0,0 +1,65 @@ +/* + * Use of this source code is governed by the MIT license that can be + * found in the LICENSE file. + */ + +package org.move.ide.formatter.blocks + +import com.intellij.formatting.* +import com.intellij.lang.ASTNode +import com.intellij.openapi.util.TextRange +import org.move.ide.formatter.MvFmtContext +import org.move.ide.formatter.impl.computeSpacing + +/** + * Synthetic formatting block wraps a subsequence of sub blocks + * and presents itself as one of the members of this subsequence. + */ +class SyntheticRsFmtBlock( + val representative: ASTBlock? = null, + private val subBlocks: List, + private val alignment: Alignment? = null, + private val indent: Indent? = null, + private val wrap: Wrap? = null, + val ctx: MvFmtContext +): ASTBlock { + + init { + assert(subBlocks.isNotEmpty()) { "tried to build empty synthetic block" } + } + + private val textRange = TextRange( + subBlocks.first().textRange.startOffset, + subBlocks.last().textRange.endOffset + ) + + override fun getTextRange(): TextRange = textRange + + override fun getNode(): ASTNode? = representative?.node + + override fun getAlignment(): Alignment? = alignment ?: representative?.alignment + override fun getIndent(): Indent? = indent ?: representative?.indent + override fun getWrap(): Wrap? = wrap ?: representative?.wrap + + override fun getSubBlocks(): List = subBlocks + + override fun getChildAttributes(newChildIndex: Int): ChildAttributes = ChildAttributes(indent, null) + override fun getSpacing(child1: Block?, child2: Block): Spacing? = computeSpacing(child1, child2, ctx) + + override fun isLeaf(): Boolean = false + override fun isIncomplete(): Boolean = subBlocks.last().isIncomplete + + override fun toString(): String { + val text = findFirstNonSyntheticChild()?.psi?.containingFile?.text?.let { textRange.subSequence(it) } + ?: "" + return "$text $textRange" + } + + private fun findFirstNonSyntheticChild(): ASTNode? { + return when (val child = subBlocks.first()) { + is SyntheticRsFmtBlock -> child.findFirstNonSyntheticChild() + is ASTBlock -> child.node + else -> null + } + } +} diff --git a/src/main/kotlin/org/move/ide/formatter/impl/alignment.kt b/src/main/kotlin/org/move/ide/formatter/impl/alignment.kt index 832b6350c..6921f85bc 100644 --- a/src/main/kotlin/org/move/ide/formatter/impl/alignment.kt +++ b/src/main/kotlin/org/move/ide/formatter/impl/alignment.kt @@ -9,7 +9,7 @@ fun MoveFmtBlock.getAlignmentStrategy(): MvAlignmentStrategy = when (node.elemen MvAlignmentStrategy .shared() .alignUnlessBlockDelim() - .alignIf(blockCtx.commonSettings.ALIGN_MULTILINE_PARAMETERS) + .alignIf(ctx.commonSettings.ALIGN_MULTILINE_PARAMETERS) TYPE_PARAMETER_LIST -> MvAlignmentStrategy .wrap() diff --git a/src/main/kotlin/org/move/ide/formatter/impl/indent.kt b/src/main/kotlin/org/move/ide/formatter/impl/indent.kt index c87f41077..b2146ec76 100644 --- a/src/main/kotlin/org/move/ide/formatter/impl/indent.kt +++ b/src/main/kotlin/org/move/ide/formatter/impl/indent.kt @@ -3,10 +3,11 @@ package org.move.ide.formatter.impl import com.intellij.formatting.Indent import com.intellij.lang.ASTNode import org.move.ide.formatter.MoveFmtBlock +import org.move.ide.formatter.MvFmtContext import org.move.lang.MvElementTypes.* import org.move.lang.core.psi.MvExpr -fun MoveFmtBlock.computeChildIndent(childNode: ASTNode): Indent? { +fun MoveFmtBlock.computeIndent(child: ASTNode, childCtx: MvFmtContext): Indent? { val parentNode = node val parentPsi = node.psi val parentType = node.elementType @@ -23,16 +24,24 @@ fun MoveFmtBlock.computeChildIndent(childNode: ASTNode): Indent? { // else // 2 + 2; parentType == ELSE_BLOCK - && childNode.elementType == INLINE_BLOCK -> Indent.getContinuationIndent() + && child.elementType == INLINE_BLOCK -> Indent.getContinuationIndent() // do not indent else block - childNode.elementType == ELSE_BLOCK -> Indent.getNoneIndent() + child.elementType == ELSE_BLOCK -> Indent.getNoneIndent() // indent every child of the block except for braces // module M { // struct S {} // } - parentType in DELIMITED_BLOCKS -> getNormalIndentIfNotCurrentBlockDelimiter(childNode, parentNode) + parentType in DELIMITED_BLOCKS -> getIndentIfNotDelim(child, parentNode) + + // Indent flat block contents, excluding closing brace + node.isFlatBlock -> + if (childCtx.metLBrace) { + getIndentIfNotDelim(child, node) + } else { + Indent.getNoneIndent() + } // // let a = // // 92; @@ -59,8 +68,15 @@ fun MoveFmtBlock.computeChildIndent(childNode: ASTNode): Indent? { } } -fun getNormalIndentIfNotCurrentBlockDelimiter(child: ASTNode, parent: ASTNode): Indent = - if (child.isDelimiterOfCurrentBlock(parent)) { +//fun getNormalIndentIfNotCurrentBlockDelimiter(child: ASTNode, parent: ASTNode): Indent = +// if (child.isDelimiterOfCurrentBlock(parent)) { +// Indent.getNoneIndent() +// } else { +// Indent.getNormalIndent() +// } + +private fun getIndentIfNotDelim(child: ASTNode, parent: ASTNode): Indent = + if (child.isBlockDelim(parent)) { Indent.getNoneIndent() } else { Indent.getNormalIndent() diff --git a/src/main/kotlin/org/move/ide/formatter/impl/spacing.kt b/src/main/kotlin/org/move/ide/formatter/impl/spacing.kt index b860482c0..d272e23e8 100644 --- a/src/main/kotlin/org/move/ide/formatter/impl/spacing.kt +++ b/src/main/kotlin/org/move/ide/formatter/impl/spacing.kt @@ -18,7 +18,6 @@ import org.move.lang.core.MOVE_COMMENTS import org.move.lang.core.MOVE_KEYWORDS import org.move.lang.core.psi.MvAddressBlock import org.move.lang.core.psi.MvModule -import org.move.lang.core.psi.MvModuleBlock import org.move.lang.core.psi.ext.getNextNonCommentSibling import org.move.lang.core.psi.ext.getPrevNonCommentSibling import org.move.lang.core.tokenSetOf @@ -55,6 +54,15 @@ fun createSpacingBuilder(commonSettings: CommonCodeStyleSettings): SpacingBuilde // .withinPairInside(L_BRACE, R_BRACE, STRUCT_PAT).spacing(1, 1, 0, true, 0) // .withinPairInside(L_BRACE, R_BRACE, STRUCT_LIT_EXPR).spacing(1, 1, 0, true, 0) + // handling `module 0x1::M {}` and `let S { f1, f2: f }` blocks + .beforeInside(L_BRACE, FLAT_BRACE_BLOCKS).spaces(1) + .afterInside(L_BRACE, FLAT_BRACE_BLOCKS) + .parentDependentLFSpacing(1, 1, true, 0) + .beforeInside(R_BRACE, FLAT_BRACE_BLOCKS) + .parentDependentLFSpacing(1, 1, true, 0) + .withinPairInside(L_BRACE, R_BRACE, STRUCT_PAT) + .spacing(1, 1, 0, true, 0) + // .afterInside(L_BRACE, tokenSetOf(STRUCT_PAT_FIELDS_BLOCK, STRUCT_LIT_FIELDS_BLOCK)).spaces(1) // .beforeInside(R_BRACE, tokenSetOf(STRUCT_PAT_FIELDS_BLOCK, STRUCT_LIT_FIELDS_BLOCK)).spaces(1) // .beforeInside(L_BRACE, tokenSetOf(STRUCT_PAT, STRUCT_LIT_EXPR)).spaces(1) @@ -120,7 +128,7 @@ fun Block.computeSpacing(child1: Block?, child2: Block, ctx: MvFmtContext): Spac ) (ncPsi1.text == "{" && ncPsi1.parent is MvAddressBlock && ncPsi2 is MvModule) - || (ncPsi1.text == "{" && ncPsi1.parent is MvModuleBlock && ncPsi2.isModuleItem) + || (ncPsi1.text == "{" && ncPsi1.parent is MvModule && ncPsi2.isModuleItem) -> return lineBreak( minLineFeeds = if (!needsBlankLineBetweenItems()) 0 else 1, keepLineBreaks = ctx.commonSettings.KEEP_LINE_BREAKS, diff --git a/src/main/kotlin/org/move/ide/formatter/impl/utils.kt b/src/main/kotlin/org/move/ide/formatter/impl/utils.kt index 1ef08fed9..7554836aa 100644 --- a/src/main/kotlin/org/move/ide/formatter/impl/utils.kt +++ b/src/main/kotlin/org/move/ide/formatter/impl/utils.kt @@ -20,26 +20,37 @@ import com.intellij.psi.tree.TokenSet.create as ts val ONE_LINE_ITEMS = ts(USE_STMT, CONST) val PAREN_DELIMITED_BLOCKS = ts( - PARENS_EXPR, TUPLE_PAT, TUPLE_TYPE, TUPLE_LIT_EXPR, CONDITION, + PARENS_EXPR, TUPLE_PAT, TUPLE_TYPE, TUPLE_LIT_EXPR, + CONDITION, MATCH_ARGUMENT, FUNCTION_PARAMETER_LIST, VALUE_ARGUMENT_LIST, ATTR_ITEM_LIST, ITEM_SPEC_FUNCTION_PARAMETER_LIST ) +val PAREN_LISTS = orSet(PAREN_DELIMITED_BLOCKS, /*ts(PAT_TUPLE_STRUCT)*/) + val ANGLE_DELIMITED_BLOCKS = ts(TYPE_PARAMETER_LIST, TYPE_ARGUMENT_LIST, ITEM_SPEC_TYPE_PARAMETER_LIST) -val BRACKET_DELIMITED_BLOCKS = ts(VECTOR_LIT_ITEMS) +val ANGLE_LISTS = orSet(ANGLE_DELIMITED_BLOCKS) + +val BRACK_DELIMITED_BLOCKS = ts(VECTOR_LIT_ITEMS) +val BRACK_LISTS = orSet(BRACK_DELIMITED_BLOCKS, ts(INDEX_EXPR)) -val STRUCT_LITERAL_BLOCKS = ts(STRUCT_PAT_FIELDS_BLOCK, STRUCT_LIT_FIELDS_BLOCK) +val STRUCT_LITERAL_BLOCKS = ts(STRUCT_LIT_FIELDS_BLOCK) +//val STRUCT_LITERAL_BLOCKS = ts(STRUCT_PAT_FIELDS_BLOCK, STRUCT_LIT_FIELDS_BLOCK) val DEF_BLOCKS = ts( - SCRIPT_BLOCK, ADDRESS_BLOCK, MODULE_BLOCK, CODE_BLOCK, + /*SCRIPT_BLOCK, */ADDRESS_BLOCK, /*MODULE_BLOCK, */CODE_BLOCK, MODULE_SPEC_BLOCK, SPEC_CODE_BLOCK, BLOCK_FIELDS, SCHEMA_FIELDS_BLOCK ) + val BLOCK_LIKE = orSet(STRUCT_LITERAL_BLOCKS, DEF_BLOCKS) +val BRACE_LISTS = ts(USE_GROUP) +val BRACE_DELIMITED_BLOCKS = orSet(BLOCK_LIKE, BRACE_LISTS) val DELIMITED_BLOCKS = orSet( - PAREN_DELIMITED_BLOCKS, ANGLE_DELIMITED_BLOCKS, BRACKET_DELIMITED_BLOCKS, + PAREN_DELIMITED_BLOCKS, ANGLE_DELIMITED_BLOCKS, BRACK_DELIMITED_BLOCKS, BLOCK_LIKE, ts(USE_GROUP) ) +val FLAT_BRACE_BLOCKS = ts(SCRIPT, MODULE, STRUCT_PAT) fun ASTNode?.isWhitespaceOrEmpty() = this == null || textLength == 0 || elementType == TokenType.WHITE_SPACE @@ -73,7 +84,7 @@ fun ASTNode.isDelimiterOfCurrentBlock(parent: ASTNode?): Boolean { val parentType = parent.elementType return when (elementType) { L_BRACE, R_BRACE -> parentType in BLOCK_LIKE || parentType == USE_GROUP - L_BRACK, R_BRACK -> parentType in BRACKET_DELIMITED_BLOCKS + L_BRACK, R_BRACK -> parentType in BRACK_DELIMITED_BLOCKS L_PAREN, R_PAREN -> parentType in PAREN_DELIMITED_BLOCKS LT, GT -> parentType in ANGLE_DELIMITED_BLOCKS else -> false @@ -90,17 +101,29 @@ val PsiElement.location: PsiLocation? get() { return PsiLocation(location.first, location.second) } -//val ASTNode.isFlatBraceBlock: Boolean -// get() = elementType in FLAT_BRACE_BLOCKS +val ASTNode.isFlatBraceBlock: Boolean + get() = elementType in FLAT_BRACE_BLOCKS /** * A flat block is a Rust PSI element which does not denote separate PSI - * element for its _block_ part (e.g. `{...}`), for example [MOD_ITEM]. + * element for its _block_ part (e.g. `{...}`), for example [MODULE]. */ -//val ASTNode.isFlatBlock: Boolean -// get() = isFlatBraceBlock +val ASTNode.isFlatBlock: Boolean + get() = isFlatBraceBlock // || elementType == PAT_TUPLE_STRUCT +fun ASTNode.isBlockDelim(parent: ASTNode?): Boolean { + if (parent == null) return false + val parentType = parent.elementType + return when (elementType) { + L_BRACE, R_BRACE -> parentType in BRACE_DELIMITED_BLOCKS || parent.isFlatBraceBlock + L_BRACK, R_BRACK -> parentType in BRACK_LISTS + L_PAREN, R_PAREN -> parentType in PAREN_LISTS /*|| parentType == PAT_TUPLE_STRUCT*/ + LT, GT -> parentType in ANGLE_LISTS + OR -> parentType == FUNCTION_PARAMETER_LIST && parent.treeParent?.elementType == LAMBDA_EXPR + else -> false + } +} //class CommaList( // val list: IElementType, diff --git a/src/main/kotlin/org/move/ide/hints/DeclarationRangeHandler.kt b/src/main/kotlin/org/move/ide/hints/DeclarationRangeHandler.kt index a833bf71f..b843303d2 100644 --- a/src/main/kotlin/org/move/ide/hints/DeclarationRangeHandler.kt +++ b/src/main/kotlin/org/move/ide/hints/DeclarationRangeHandler.kt @@ -13,7 +13,7 @@ import org.move.lang.core.psi.ext.startOffset class ModuleDeclarationRangeHandler : DeclarationRangeHandler { override fun getDeclarationRange(container: MvModule): TextRange { val startOffset = container.firstNonCommentChild.startOffset - val endOffset = (container.moduleBlock?.getPrevNonCommentSibling() ?: container).endOffset + val endOffset = (container.lBrace?.getPrevNonCommentSibling() ?: container).endOffset return TextRange(startOffset, endOffset) } } diff --git a/src/main/kotlin/org/move/ide/hints/FunctionParameterInfoHandler.kt b/src/main/kotlin/org/move/ide/hints/FunctionParameterInfoHandler.kt index 69be9a615..bc20a43f8 100644 --- a/src/main/kotlin/org/move/ide/hints/FunctionParameterInfoHandler.kt +++ b/src/main/kotlin/org/move/ide/hints/FunctionParameterInfoHandler.kt @@ -19,11 +19,7 @@ class FunctionParameterInfoHandler: AsyncParameterInfoHandlerBase() ?: return null -// val block = element.ancestorStrict() -// if (block != null && callExpr.contains(block)) return null return element.ancestorOrSelf(stopAt = MvStructLitFieldsBlock::class.java) -// return callExpr } override fun calculateParameterInfo(element: MvValueArgumentList): Array? = diff --git a/src/main/kotlin/org/move/ide/hints/StructLiteralFieldsInfoHandler.kt b/src/main/kotlin/org/move/ide/hints/StructLiteralFieldsInfoHandler.kt index e19777af7..53813b0d6 100644 --- a/src/main/kotlin/org/move/ide/hints/StructLiteralFieldsInfoHandler.kt +++ b/src/main/kotlin/org/move/ide/hints/StructLiteralFieldsInfoHandler.kt @@ -21,9 +21,6 @@ class StructLitFieldsInfoHandler : override fun findTargetElement(file: PsiFile, offset: Int): MvStructLitFieldsBlock? { val element = file.findElementAt(offset) ?: return null -// val block = element.ancestorStrict() ?: return null - // val callExpr = element.ancestorStrict() -// if (callExpr != null && block.contains(callExpr)) return null return element.ancestorOrSelf(stopAt = MvValueArgumentList::class.java) } diff --git a/src/main/kotlin/org/move/ide/inspections/FieldInitShorthandInspection.kt b/src/main/kotlin/org/move/ide/inspections/FieldInitShorthandInspection.kt index 90cf3d315..e7865e2fb 100644 --- a/src/main/kotlin/org/move/ide/inspections/FieldInitShorthandInspection.kt +++ b/src/main/kotlin/org/move/ide/inspections/FieldInitShorthandInspection.kt @@ -20,9 +20,9 @@ class FieldInitShorthandInspection : MvLocalInspectionTool() { ) } - override fun visitStructPatField(field: MvStructPatField) { + override fun visitFieldPat(field: MvFieldPat) { val ident = field.identifier ?: return - val fieldBinding = field.structPatFieldBinding ?: return + val fieldBinding = field.fieldPatBinding ?: return if (ident.text == fieldBinding.pat.text.orEmpty()) { holder.registerProblem( field, diff --git a/src/main/kotlin/org/move/ide/inspections/MvAbilityCheckInspection.kt b/src/main/kotlin/org/move/ide/inspections/MvAbilityCheckInspection.kt index c9ac1f8d0..eb587bb8c 100644 --- a/src/main/kotlin/org/move/ide/inspections/MvAbilityCheckInspection.kt +++ b/src/main/kotlin/org/move/ide/inspections/MvAbilityCheckInspection.kt @@ -16,9 +16,9 @@ import org.move.lang.core.types.infer.loweredType import org.move.lang.core.types.ty.GenericTy import org.move.lang.core.types.ty.TyUnknown -class MvAbilityCheckInspection : MvLocalInspectionTool() { +class MvAbilityCheckInspection: MvLocalInspectionTool() { override fun buildMvVisitor(holder: ProblemsHolder, isOnTheFly: Boolean) = - object : MvVisitor() { + object: MvVisitor() { override fun visitValueArgumentList(o: MvValueArgumentList) { if (o.isMsl()) return @@ -61,7 +61,7 @@ class MvAbilityCheckInspection : MvLocalInspectionTool() { val message = "The type '${actualType.text()}' does not have required " + "${pluralise(missingAbilities.size, "ability", "abilities")} " + "'$abilitiesText'" - holder.registerProblem(typeArgument, message, ProblemHighlightType.GENERIC_ERROR) + holder.registerProblem(typeArgument, message, ProblemHighlightType.GENERIC_ERROR) } } } diff --git a/src/main/kotlin/org/move/ide/inspections/MvUnresolvedReferenceInspection.kt b/src/main/kotlin/org/move/ide/inspections/MvUnresolvedReferenceInspection.kt index a0aec6a2b..0a5dc5c8e 100644 --- a/src/main/kotlin/org/move/ide/inspections/MvUnresolvedReferenceInspection.kt +++ b/src/main/kotlin/org/move/ide/inspections/MvUnresolvedReferenceInspection.kt @@ -100,7 +100,7 @@ class MvUnresolvedReferenceInspection: MvLocalInspectionTool() { } } - override fun visitStructPatField(patField: MvStructPatField) { + override fun visitFieldPat(patField: MvFieldPat) { if (patField.isMsl() && !isDebugModeEnabled()) { return } diff --git a/src/main/kotlin/org/move/ide/inspections/fixes/FieldShorthandFix.kt b/src/main/kotlin/org/move/ide/inspections/fixes/FieldShorthandFix.kt index 2845c8984..717ad1f0f 100644 --- a/src/main/kotlin/org/move/ide/inspections/fixes/FieldShorthandFix.kt +++ b/src/main/kotlin/org/move/ide/inspections/fixes/FieldShorthandFix.kt @@ -16,12 +16,12 @@ sealed class FieldShorthandFix(field: T) : DiagnosticFix(field } } - class StructPat(field: MvStructPatField) : FieldShorthandFix(field) { + class StructPat(field: MvFieldPat) : FieldShorthandFix(field) { override fun getText(): String = "Use pattern shorthand" - override fun invoke(project: Project, file: PsiFile, element: MvStructPatField) { + override fun invoke(project: Project, file: PsiFile, element: MvFieldPat) { val fieldIdent = element.identifier ?: return - element.structPatFieldBinding?.delete() + element.fieldPatBinding?.delete() fieldIdent.replace(project.psiFactory.bindingPat(fieldIdent.text)) } } diff --git a/src/main/kotlin/org/move/ide/inspections/imports/ImportAnalyzer.kt b/src/main/kotlin/org/move/ide/inspections/imports/ImportAnalyzer.kt index d1d44de70..7754a22c4 100644 --- a/src/main/kotlin/org/move/ide/inspections/imports/ImportAnalyzer.kt +++ b/src/main/kotlin/org/move/ide/inspections/imports/ImportAnalyzer.kt @@ -9,8 +9,10 @@ import org.move.stdext.chain class ImportAnalyzer2(val holder: ProblemsHolder): MvVisitor() { - override fun visitModuleBlock(o: MvModuleBlock) = analyzeImportsOwner(o) - override fun visitScriptBlock(o: MvScriptBlock) = analyzeImportsOwner(o) + override fun visitModule(o: MvModule) = analyzeImportsOwner(o) +// override fun visitModuleBlock(o: MvModuleBlock) = analyzeImportsOwner(o) + override fun visitScript(o: MvScript) = analyzeImportsOwner(o) +// override fun visitScriptBlock(o: MvScriptBlock) = analyzeImportsOwner(o) override fun visitModuleSpecBlock(o: MvModuleSpecBlock) = analyzeImportsOwner(o) fun analyzeImportsOwner(importsOwner: MvItemsOwner) { @@ -102,15 +104,15 @@ fun ProblemsHolder.registerStmtSpeckError2(useStmt: MvUseStmt, useItems: Set get() { return when (this) { - is MvModuleBlock -> { + is MvModule -> { // add all module spec blocks - listOf(this).chain(this.module.allModuleSpecBlocks()).toList() + listOf(this).chain(this.allModuleSpecBlocks()).toList() } is MvModuleSpecBlock -> { // add module block - val moduleBlock = this.moduleSpec.moduleItem?.moduleBlock - if (moduleBlock != null) { - listOf(moduleBlock, this) + val moduleItem = this.moduleSpec.moduleItem + if (moduleItem != null) { + listOf(moduleItem, this) } else { listOf(this) } diff --git a/src/main/kotlin/org/move/ide/intentions/ChopListIntention.kt b/src/main/kotlin/org/move/ide/intentions/ChopListIntention.kt index 02a5c3d0f..667891254 100644 --- a/src/main/kotlin/org/move/ide/intentions/ChopListIntention.kt +++ b/src/main/kotlin/org/move/ide/intentions/ChopListIntention.kt @@ -71,9 +71,3 @@ class ChopStructLiteralIntention : ChopListIntentionBase( - MvStructPatFieldsBlock::class.java, - MvStructPatField::class.java, - "Put fields on separate lines" -) diff --git a/src/main/kotlin/org/move/ide/intentions/InlineAddressBlockIntention.kt b/src/main/kotlin/org/move/ide/intentions/InlineAddressBlockIntention.kt deleted file mode 100644 index cd140009e..000000000 --- a/src/main/kotlin/org/move/ide/intentions/InlineAddressBlockIntention.kt +++ /dev/null @@ -1,38 +0,0 @@ -package org.move.ide.intentions - -import com.intellij.openapi.editor.Editor -import com.intellij.openapi.project.Project -import com.intellij.psi.PsiElement -import org.move.lang.core.psi.MvAddressDef -import org.move.lang.core.psi.MvModuleBlock -import org.move.lang.core.psi.ext.ancestorStrict -import org.move.lang.core.psi.ext.hasAncestorOrSelf -import org.move.lang.core.psi.ext.modules -import org.move.lang.core.psi.psiFactory - -class InlineAddressBlockIntention : MvElementBaseIntentionAction() { - - override fun getText(): String = "Inline address block" - - override fun getFamilyName(): String = text - - data class Context(val address: MvAddressDef) - - override fun findApplicableContext(project: Project, editor: Editor, element: PsiElement): Context? { - if (element.hasAncestorOrSelf()) return null - val address = element.ancestorStrict() ?: return null - if (address.modules().size != 1) return null - return Context(address) - } - - override fun invoke(project: Project, editor: Editor, ctx: Context) { - val address = ctx.address - val addressText = address.addressRef?.text ?: return - val module = address.modules().firstOrNull() ?: return - val moduleNameElement = module.nameElement ?: return - val blockText = module.moduleBlock?.text ?: return - - val inlineModule = project.psiFactory.inlineModule(addressText, moduleNameElement.text, blockText) - address.replace(inlineModule) - } -} diff --git a/src/main/kotlin/org/move/ide/refactoring/MvImportOptimizer.kt b/src/main/kotlin/org/move/ide/refactoring/MvImportOptimizer.kt index 598106157..acba928fd 100644 --- a/src/main/kotlin/org/move/ide/refactoring/MvImportOptimizer.kt +++ b/src/main/kotlin/org/move/ide/refactoring/MvImportOptimizer.kt @@ -70,7 +70,7 @@ class MvImportOptimizer : ImportOptimizer { it.useGroup?.sortUseSpecks() } } - if (stmtOwner is MvModuleBlock) { + if (stmtOwner is MvModule) { reorderUseStmtsIntoGroups(stmtOwner) } } @@ -93,23 +93,21 @@ class MvImportOptimizer : ImportOptimizer { rootUseSpeck.replace(newUseSpeck) } - private fun reorderUseStmtsIntoGroups(useScope: MvItemsOwner) { - val useStmts = useScope.useStmtList - val first = useScope.childrenOfType() - .firstOrNull { it !is MvAttr && it !is PsiComment } ?: return - val psiFactory = useScope.project.psiFactory + private fun reorderUseStmtsIntoGroups(itemsOwner: MvItemsOwner) { + val useStmts = itemsOwner.useStmtList + val firstItem = itemsOwner.firstItem ?: return + val psiFactory = itemsOwner.project.psiFactory val sortedUses = useStmts .asSequence() .map { UseStmtWrapper(it) } .sorted() for ((useWrapper, nextUseWrapper) in sortedUses.withNext()) { - val addedUseItem = useScope.addBefore(useWrapper.useStmt, first) - useScope.addAfter(psiFactory.createNewline(), addedUseItem) + val addedUseItem = itemsOwner.addBefore(useWrapper.useStmt, firstItem) + itemsOwner.addAfter(psiFactory.createNewline(), addedUseItem) val addNewLine = useWrapper.packageGroupLevel != nextUseWrapper?.packageGroupLevel -// && (nextUseWrapper != null || useScope is MvModuleBlock) if (addNewLine) { - useScope.addAfter(psiFactory.createNewline(), addedUseItem) + itemsOwner.addAfter(psiFactory.createNewline(), addedUseItem) } } useStmts.forEach { diff --git a/src/main/kotlin/org/move/ide/refactoring/MvRenameProcessor.kt b/src/main/kotlin/org/move/ide/refactoring/MvRenameProcessor.kt index bbc21ef74..800cd644a 100644 --- a/src/main/kotlin/org/move/ide/refactoring/MvRenameProcessor.kt +++ b/src/main/kotlin/org/move/ide/refactoring/MvRenameProcessor.kt @@ -45,9 +45,9 @@ class MvRenameProcessor : RenamePsiElementProcessor() { val newLitField = psiFactory.structLitField(newName, usage.referenceName) usage.replace(newLitField) } - usage is MvStructPatField && usage.isShorthand -> { + usage is MvFieldPat && usage.isShorthand -> { // NEW_PAT_FIELD_NAME: OLD_VARIABLE_NAME - val newPatField = psiFactory.structPatField(newName, usage.referenceName) + val newPatField = psiFactory.fieldPat(newName, usage.referenceName) usage.replace(newPatField) } } @@ -86,8 +86,8 @@ class MvRenameProcessor : RenamePsiElementProcessor() { } val elementToRename = when { - element is MvBindingPat && element.parent is MvStructPatField -> { - val newField = psiFactory.structPatField(element.identifier.text, element.text) + element is MvBindingPat && element.parent is MvFieldPat -> { + val newField = psiFactory.fieldPat(element.identifier.text, element.text) val newFieldInTree = element.parent.replace(newField) newFieldInTree.descendantOfTypeStrict()!! } diff --git a/src/main/kotlin/org/move/ide/structureView/MvStructureViewTreeElement.kt b/src/main/kotlin/org/move/ide/structureView/MvStructureViewTreeElement.kt index 14b48bca5..9a7a55b22 100644 --- a/src/main/kotlin/org/move/ide/structureView/MvStructureViewTreeElement.kt +++ b/src/main/kotlin/org/move/ide/structureView/MvStructureViewTreeElement.kt @@ -40,7 +40,7 @@ class MvStructureViewTreeElement(val element: NavigatablePsiElement): StructureV is MoveFile -> { listOf( element.modules().toList(), - element.scriptBlocks().flatMap { it.functionList } + element.scripts().flatMap { it.functionList } ).flatten() } is MvAddressDef -> element.modules() diff --git a/src/main/kotlin/org/move/ide/utils/imports/ImportUtils.kt b/src/main/kotlin/org/move/ide/utils/imports/ImportUtils.kt index 5faf7931a..9f63e6b98 100644 --- a/src/main/kotlin/org/move/ide/utils/imports/ImportUtils.kt +++ b/src/main/kotlin/org/move/ide/utils/imports/ImportUtils.kt @@ -11,9 +11,7 @@ import org.move.openapiext.checkWriteAccessAllowed */ fun ImportCandidate.import(context: MvElement) { checkWriteAccessAllowed() - val insertionScope = context.containingModule?.moduleBlock - ?: context.containingScript?.scriptBlock - ?: return + val insertionScope = context.containingModule ?: context.containingScript ?: return val insertTestOnly = insertionScope.itemScope == NamedItemScope.MAIN && context.itemScope == NamedItemScope.TEST @@ -162,7 +160,7 @@ private fun insertUseStmtAtTheCorrectLocation(mod: MvItemsOwner, useStmt: MvUseS val newline = psiFactory.createNewline() val useStmts = mod.childrenOfType().map(::UseStmtWrapper) if (useStmts.isEmpty()) { - val anchor = mod.items().first() + val anchor = mod.firstItem mod.addAfter(newline, mod.addBefore(useStmt, anchor)) return true } diff --git a/src/main/kotlin/org/move/lang/MoveFile.kt b/src/main/kotlin/org/move/lang/MoveFile.kt index 668aea168..09b604719 100644 --- a/src/main/kotlin/org/move/lang/MoveFile.kt +++ b/src/main/kotlin/org/move/lang/MoveFile.kt @@ -64,10 +64,7 @@ class MoveFile(fileViewProvider: FileViewProvider) : MoveFileBase(fileViewProvid return defs.mapNotNull { it.addressBlock }.toList() } - fun scriptBlocks(): List { - val defs = PsiTreeUtil.getChildrenOfTypeAsList(this, MvScript::class.java) - return defs.mapNotNull { it.scriptBlock }.toList() - } + fun scripts(): List = this.childrenOfType() fun modules(): Sequence { return getProjectPsiDependentCache(this) { diff --git a/src/main/kotlin/org/move/lang/core/MvPsiPatterns.kt b/src/main/kotlin/org/move/lang/core/MvPsiPattern.kt similarity index 62% rename from src/main/kotlin/org/move/lang/core/MvPsiPatterns.kt rename to src/main/kotlin/org/move/lang/core/MvPsiPattern.kt index b3febecb6..6122fd1a7 100644 --- a/src/main/kotlin/org/move/lang/core/MvPsiPatterns.kt +++ b/src/main/kotlin/org/move/lang/core/MvPsiPattern.kt @@ -1,6 +1,8 @@ package org.move.lang.core import com.intellij.patterns.* +import com.intellij.patterns.PlatformPatterns.psiElement +import com.intellij.patterns.StandardPatterns.or import com.intellij.psi.PsiComment import com.intellij.psi.PsiElement import com.intellij.psi.PsiErrorElement @@ -12,39 +14,45 @@ import org.move.lang.MoveFile import org.move.lang.MvElementTypes.* import org.move.lang.core.psi.* import org.move.lang.core.psi.ext.elementType -import org.move.lang.core.psi.ext.hasAncestorOrSelf import org.move.lang.core.psi.ext.leftLeaves -object MvPsiPatterns { +object MvPsiPattern { private val STMT_BOUNDARIES = TokenSet.create(SEMICOLON, L_BRACE, R_BRACE) - val whitespace: PsiElementPattern.Capture = PlatformPatterns.psiElement().whitespace() +// val whitespace: PsiElementPattern.Capture = PlatformPatterns.psiElement().whitespace() - val onStmtBeginning: PsiElementPattern.Capture = - PlatformPatterns.psiElement().with(OnStmtBeginning()) + fun identifierStatementBeginningPattern(vararg startWords: String): PsiElementPattern.Capture = + psiElement(IDENTIFIER).and(onStatementBeginning(*startWords)) - fun onStmtBeginning(vararg startWords: String): PsiElementPattern.Capture = - PlatformPatterns.psiElement().with(OnStmtBeginning(*startWords)) +// val onStatementBeginning: PsiElementPattern.Capture = +// psiElement().with(OnStatementBeginning()) - fun toplevel(): PsiElementPattern.Capture = - psiElementWithParent() + fun onStatementBeginning(vararg startWords: String): PsiElementPattern.Capture = + psiElement().with(OnStatementBeginning(*startWords)) - fun addressBlock(): PsiElementPattern.Capture = - psiElementWithParent() + fun toplevel(): PsiElementPattern.Capture = psiElementWithParent() - fun moduleBlock(): PsiElementPattern.Capture = - psiElementWithParent() +// fun moduleChildElement(): PsiElementPattern.Capture = psiElementWithParent() - fun function(): PsiElementPattern.Capture = - psiElementWithParent() + fun module(): PsiElementPattern.Capture = psiElementWithParent() - fun scriptBlock(): PsiElementPattern.Capture = psiElementWithParent() + fun function(): PsiElementPattern.Capture = psiElementWithParent() + + fun script(): PsiElementPattern.Capture = psiElementWithParent() fun moduleSpecBlock(): PsiElementPattern.Capture = psiElementWithParent() - fun codeStmt(): PsiElementPattern.Capture = psiElementInside() + fun codeStatementPattern(): PsiElementPattern.Capture = + psiElement() + .inside(psiElement()) + .andNot(psiElement().withParent(MvModule::class.java)) + .andNot(psiElement().withSuperParent(3, MvStructLitExpr::class.java)) + // let S { field } = 1 + // STRUCT_PAT[FIELD_PAT[BINDING[IDENTIFIER]]] + // ^ 3 ^ 2 ^ 1 ^ 0 + .andNot(psiElement().withSuperParent(3, MvStructPat::class.java)) - fun anySpecStart() = psiElementInside().and(onStmtBeginning("spec")) + fun anySpecStart() = psiElementInside().and(onStatementBeginning("spec")) fun itemSpecStmt(): PsiElementPattern.Capture = psiElementInside() @@ -52,9 +60,7 @@ object MvPsiPatterns { fun bindingPat(): PsiElementPattern.Capture = psiElementWithParent() - fun namedAddress(): PsiElementPattern.Capture { - return psiElement() - } + fun namedAddress(): PsiElementPattern.Capture = psiElement() fun typeParameter(): PsiElementPattern.Capture = psiElementWithParent() @@ -91,38 +97,34 @@ object MvPsiPatterns { .withCond("FirstChild") { it.prevSibling == null } fun specIdentifier(): PsiElementPattern.Capture = - PlatformPatterns.psiElement() + psiElement() .withParent() - private fun whitespaceAndErrors() = PlatformPatterns.psiElement().whitespaceCommentEmptyOrError() + private fun whitespaceAndErrors() = psiElement().whitespaceCommentEmptyOrError() - inline fun psiElementWithParent() = - PlatformPatterns.psiElement().withParent( - StandardPatterns.or( - psiElement(), - psiElement().withParent(psiElement()) - ) + inline fun psiElementWithParent() = + psiElement() + .withParent(or(psiElement(), psiElement().withParent(psiElement())) ) - inline fun psiElementAfterSiblingSkipping( + inline fun psiElementAfterSiblingSkipping( skip: ElementPattern<*>, ) = - StandardPatterns.or( - PlatformPatterns.psiElement() - .afterSiblingSkipping(skip, psiElement()), - PlatformPatterns.psiElement() + or( + psiElement().afterSiblingSkipping(skip, psiElement()), + psiElement() .withParent(psiElement().afterSiblingSkipping(skip, psiElement())) ) - inline fun psiElementInside(): PsiElementPattern.Capture = - PlatformPatterns.psiElement().inside( - StandardPatterns.or( + inline fun psiElementInside(): PsiElementPattern.Capture = + psiElement().inside( + or( psiElement(), psiElement().withParent(psiElement()) ) ) - class AfterSibling(val sibling: IElementType, val withPossibleError: Boolean = true) : + class AfterSibling(val sibling: IElementType, val withPossibleError: Boolean = true): PatternCondition("afterSiblingKeywords") { override fun accepts(t: PsiElement, context: ProcessingContext?): Boolean { var element = t @@ -140,7 +142,7 @@ object MvPsiPatterns { } } - class AfterAnySibling(val siblings: TokenSet, val withPossibleError: Boolean = true) : + class AfterAnySibling(val siblings: TokenSet, val withPossibleError: Boolean = true): PatternCondition("afterSiblingKeywords") { override fun accepts(t: PsiElement, context: ProcessingContext?): Boolean { var element = t @@ -158,17 +160,18 @@ object MvPsiPatterns { } } - private class OnStmtBeginning( + private class OnStatementBeginning( vararg startWords: String - ) : PatternCondition("on statement beginning") { + ): PatternCondition("on statement beginning") { val myStartWords = startWords override fun accepts(t: PsiElement, context: ProcessingContext?): Boolean { val prev = t.prevVisibleOrNewLine return if (myStartWords.isEmpty()) { val onBoundary = prev == null || prev is PsiWhiteSpace || prev.node.elementType in STMT_BOUNDARIES - onBoundary && - !(t.hasAncestorOrSelf() || t.hasAncestorOrSelf()) +// onBoundary && +// !(t.hasAncestorOrSelf() || t.hasAncestorOrSelf()) + onBoundary } else { prev != null && prev.node.text in myStartWords } @@ -185,22 +188,22 @@ private val PsiElement.prevVisibleOrNewLine: PsiElement? } -inline fun psiElement(): PsiElementPattern.Capture { +inline fun psiElement(): PsiElementPattern.Capture { return PlatformPatterns.psiElement(I::class.java) } -inline fun PsiElementPattern.Capture.withParent(): PsiElementPattern.Capture { +inline fun PsiElementPattern.Capture.withParent(): PsiElementPattern.Capture { return this.withSuperParent(1, I::class.java) } -inline fun PsiElementPattern.Capture.withSuperParent(level: Int): PsiElementPattern.Capture { +inline fun PsiElementPattern.Capture.withSuperParent(level: Int): PsiElementPattern.Capture { return this.withSuperParent(level, I::class.java) } -fun > ObjectPattern.withCond( +fun > ObjectPattern.withCond( name: String, cond: (T) -> Boolean ): Self = - with(object : PatternCondition(name) { + with(object: PatternCondition(name) { override fun accepts(t: T, context: ProcessingContext?): Boolean = cond(t) }) diff --git a/src/main/kotlin/org/move/lang/core/completion/CommonCompletionContributor.kt b/src/main/kotlin/org/move/lang/core/completion/CommonCompletionContributor.kt index 7a649b2b6..3306bca07 100644 --- a/src/main/kotlin/org/move/lang/core/completion/CommonCompletionContributor.kt +++ b/src/main/kotlin/org/move/lang/core/completion/CommonCompletionContributor.kt @@ -2,12 +2,17 @@ package org.move.lang.core.completion import com.intellij.codeInsight.completion.* import com.intellij.codeInsight.completion.impl.CompletionSorterImpl -import org.move.lang.core.MvPsiPatterns +import com.intellij.psi.util.elementType +import org.move.lang.MvElementTypes.IDENTIFIER +import org.move.lang.MvElementTypes.MODULE_KW +import org.move.lang.core.MvPsiPattern import org.move.lang.core.completion.providers.* import org.move.lang.core.completion.sort.COMPLETION_WEIGHERS_GROUPED import org.move.lang.core.psi.MvModule +import org.move.lang.core.psi.ext.nextNonWsSibling +import org.move.lang.core.psi.ext.prevNonWsSibling -class CommonCompletionContributor : CompletionContributor() { +class CommonCompletionContributor: CompletionContributor() { init { extend(CompletionType.BASIC, PrimitiveTypesCompletionProvider) extend(CompletionType.BASIC, SpecItemCompletionProvider) @@ -22,8 +27,8 @@ class CommonCompletionContributor : CompletionContributor() { extend(CompletionType.BASIC, SchemaFieldsCompletionProvider) extend(CompletionType.BASIC, MvPathCompletionProvider2) - extend(CompletionType.BASIC, MvPsiPatterns.ability(), AbilitiesCompletionProvider) - extend(CompletionType.BASIC, MvPsiPatterns.refExpr(), BoolsCompletionProvider) + extend(CompletionType.BASIC, MvPsiPattern.ability(), AbilitiesCompletionProvider) + extend(CompletionType.BASIC, MvPsiPattern.refExpr(), BoolsCompletionProvider) extend(CompletionType.BASIC, MacrosCompletionProvider) extend(CompletionType.BASIC, VectorLiteralCompletionProvider) @@ -36,9 +41,12 @@ class CommonCompletionContributor : CompletionContributor() { override fun beforeCompletion(context: CompletionInitializationContext) { val offset = context.startOffset - val element = context.file.findElementAt(offset) ?: return - if (element.parent is MvModule) { - context.dummyIdentifier = "DummyAddress::" + val identifier = context.file.findElementAt(offset) ?: return + if (identifier.parent is MvModule) { + // check whether the left non-whitespace sibling is `module` keyword + if (identifier.prevNonWsSibling.elementType == MODULE_KW) { + context.dummyIdentifier = "DummyAddress::" + } } } diff --git a/src/main/kotlin/org/move/lang/core/completion/KeywordCompletionContributor.kt b/src/main/kotlin/org/move/lang/core/completion/KeywordCompletionContributor.kt index bf6c1cbaf..30fec3847 100644 --- a/src/main/kotlin/org/move/lang/core/completion/KeywordCompletionContributor.kt +++ b/src/main/kotlin/org/move/lang/core/completion/KeywordCompletionContributor.kt @@ -6,21 +6,20 @@ import com.intellij.codeInsight.completion.CompletionResultSet import com.intellij.codeInsight.completion.CompletionType import com.intellij.patterns.PlatformPatterns import com.intellij.patterns.PlatformPatterns.psiElement -import com.intellij.patterns.PsiElementPattern -import com.intellij.psi.PsiElement import org.move.cli.settings.moveSettings import org.move.lang.MvElementTypes.* -import org.move.lang.core.MvPsiPatterns -import org.move.lang.core.MvPsiPatterns.addressBlock -import org.move.lang.core.MvPsiPatterns.anySpecStart -import org.move.lang.core.MvPsiPatterns.codeStmt -import org.move.lang.core.MvPsiPatterns.function -import org.move.lang.core.MvPsiPatterns.itemSpecStmt -import org.move.lang.core.MvPsiPatterns.moduleBlock -import org.move.lang.core.MvPsiPatterns.moduleSpecBlock -import org.move.lang.core.MvPsiPatterns.scriptBlock -import org.move.lang.core.MvPsiPatterns.toplevel -import org.move.lang.core.MvPsiPatterns.typeParameter +import org.move.lang.core.MvPsiPattern +import org.move.lang.core.MvPsiPattern.anySpecStart +import org.move.lang.core.MvPsiPattern.codeStatementPattern +import org.move.lang.core.MvPsiPattern.function +import org.move.lang.core.MvPsiPattern.identifierStatementBeginningPattern +import org.move.lang.core.MvPsiPattern.itemSpecStmt +import org.move.lang.core.MvPsiPattern.module +import org.move.lang.core.MvPsiPattern.moduleSpecBlock +import org.move.lang.core.MvPsiPattern.onStatementBeginning +import org.move.lang.core.MvPsiPattern.script +import org.move.lang.core.MvPsiPattern.toplevel +import org.move.lang.core.MvPsiPattern.typeParameter import org.move.lang.core.TYPES import org.move.lang.core.completion.providers.KeywordCompletionProvider @@ -28,17 +27,12 @@ class KeywordCompletionContributor: CompletionContributor() { init { extend( CompletionType.BASIC, - toplevel().and(onStmtBeginning()), + toplevel().and(identifierStatementBeginningPattern()), KeywordCompletionProvider("address", "module", "script", "spec") ) extend( CompletionType.BASIC, - addressBlock().and(onStmtBeginning()), - KeywordCompletionProvider("module") - ) - extend( - CompletionType.BASIC, - scriptBlock().and(onStmtBeginning()), + script().and(identifierStatementBeginningPattern()), KeywordCompletionProvider( "public", "fun", @@ -48,23 +42,23 @@ class KeywordCompletionContributor: CompletionContributor() { ) extend( CompletionType.BASIC, - moduleBlock().and(onStmtBeginning()), + module().and(identifierStatementBeginningPattern()), KeywordCompletionProvider( - *VISIBILITY_MODIFIERS, + *VIS_MODIFIERS, + *FUNCTION_MODIFIERS, "native", - "entry", - "inline", "fun", "struct", "const", "use", "spec", "friend", + "enum", ) ) extend( CompletionType.BASIC, - moduleSpecBlock().and(onStmtBeginning()), + moduleSpecBlock().and(identifierStatementBeginningPattern()), KeywordCompletionProvider( "use", "spec", @@ -72,37 +66,39 @@ class KeywordCompletionContributor: CompletionContributor() { ) extend( CompletionType.BASIC, - function().with(MvPsiPatterns.AfterSibling(VISIBILITY_MODIFIER)), - KeywordCompletionProvider("fun", "entry", "inline") + function().with(MvPsiPattern.AfterSibling(VISIBILITY_MODIFIER)), + KeywordCompletionProvider("fun", *FUNCTION_MODIFIERS) ) extend( CompletionType.BASIC, - function().with(MvPsiPatterns.AfterSibling(NATIVE)), + function().with(MvPsiPattern.AfterSibling(NATIVE)), KeywordCompletionProvider("fun") ) extend( CompletionType.BASIC, - moduleBlock().and(onStmtBeginning("native")), - KeywordCompletionProvider(*VISIBILITY_MODIFIERS, "fun", "struct") + module().and(identifierStatementBeginningPattern("native")), + KeywordCompletionProvider(*VIS_MODIFIERS, "fun", "struct") ) extend( CompletionType.BASIC, - codeStmt().and(onStmtBeginning()), + codeStatementPattern().and(identifierStatementBeginningPattern()), KeywordCompletionProvider( "let", "loop", - "if", "while", - "abort", - "return", "continue", "break", - "else" + "if", + "else", + "abort", + "return", + "for", + "match", ) ) extend( CompletionType.BASIC, - itemSpecStmt().and(onStmtBeginning()), + itemSpecStmt().and(identifierStatementBeginningPattern()), KeywordCompletionProvider( "pragma", "let", @@ -123,9 +119,9 @@ class KeywordCompletionContributor: CompletionContributor() { CompletionType.BASIC, PlatformPatterns.or( psiElement() - .with(MvPsiPatterns.AfterSibling(FUNCTION_PARAMETER_LIST)), + .with(MvPsiPattern.AfterSibling(FUNCTION_PARAMETER_LIST)), psiElement() - .with(MvPsiPatterns.AfterAnySibling(TYPES)) + .with(MvPsiPattern.AfterAnySibling(TYPES)) ), KeywordCompletionProvider { buildList { @@ -148,22 +144,20 @@ class KeywordCompletionContributor: CompletionContributor() { ) } - private fun onStmtBeginning(vararg startWords: String): PsiElementPattern.Capture = - psiElement(IDENTIFIER).and(MvPsiPatterns.onStmtBeginning(*startWords)) - override fun fillCompletionVariants(parameters: CompletionParameters, result: CompletionResultSet) { super.fillCompletionVariants( parameters, CommonCompletionContributor.withSorter(parameters, result) ) } - - companion object { - private val VISIBILITY_MODIFIERS = arrayOf( - "public", - "public(script)", - "public(friend)", - "public(package)" - ) - } } + +private val VIS_MODIFIERS = arrayOf( + "public", + "public(script)", + "public(friend)", + "public(package)" +) + +private val FUNCTION_MODIFIERS = arrayOf("entry", "inline") + diff --git a/src/main/kotlin/org/move/lang/core/completion/LookupElements.kt b/src/main/kotlin/org/move/lang/core/completion/LookupElements.kt index fd5320ed7..660a88b90 100644 --- a/src/main/kotlin/org/move/lang/core/completion/LookupElements.kt +++ b/src/main/kotlin/org/move/lang/core/completion/LookupElements.kt @@ -99,7 +99,6 @@ val InsertionContext.alreadyHasAngleBrackets: Boolean fun InsertionContext.nextCharIs(c: Char): Boolean = nextCharIs(c, 0) -// document.charsSequence.indexOfSkippingSpace(c, tailOffset) != null fun InsertionContext.nextCharIs(c: Char, offset: Int): Boolean = document.charsSequence.indexOfSkippingSpace(c, tailOffset + offset) != null diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/MacrosCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/MacrosCompletionProvider.kt index c7ae96fb0..b7889983d 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/MacrosCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/MacrosCompletionProvider.kt @@ -10,15 +10,15 @@ import com.intellij.patterns.PlatformPatterns import com.intellij.psi.PsiElement import com.intellij.util.ProcessingContext import org.move.lang.MvElementTypes -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.lang.core.completion.MACRO_PRIORITY import org.move.lang.core.psi.MvPath object MacrosCompletionProvider : MvCompletionProvider() { override val elementPattern: ElementPattern - get() = MvPsiPatterns.path() - .andNot(MvPsiPatterns.pathType()) - .andNot(MvPsiPatterns.schemaLit()) + get() = MvPsiPattern.path() + .andNot(MvPsiPattern.pathType()) + .andNot(MvPsiPattern.schemaLit()) .andNot( PlatformPatterns.psiElement() .afterLeaf(PlatformPatterns.psiElement(MvElementTypes.COLON_COLON)) diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/MvPathCompletionProvider2.kt b/src/main/kotlin/org/move/lang/core/completion/providers/MvPathCompletionProvider2.kt index 5e615c097..fe10c3676 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/MvPathCompletionProvider2.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/MvPathCompletionProvider2.kt @@ -7,7 +7,7 @@ import com.intellij.psi.PsiElement import com.intellij.util.ProcessingContext import org.move.ide.inspections.imports.ImportContext import org.move.ide.utils.imports.ImportCandidateCollector -import org.move.lang.core.MvPsiPatterns.path +import org.move.lang.core.MvPsiPattern.path import org.move.lang.core.completion.CompletionContext import org.move.lang.core.completion.UNIMPORTED_ITEM_PRIORITY import org.move.lang.core.completion.createLookupElement diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/NamedAddressInUseStmtCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/NamedAddressInUseStmtCompletionProvider.kt index a2339234c..c54406814 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/NamedAddressInUseStmtCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/NamedAddressInUseStmtCompletionProvider.kt @@ -11,7 +11,7 @@ import com.intellij.psi.PsiElement import com.intellij.util.ProcessingContext import org.move.cli.AddressVal import org.move.ide.MoveIcons -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.lang.core.completion.alreadyHasColonColon import org.move.lang.core.psi.MvModule import org.move.lang.core.psi.MvNamedAddress @@ -75,7 +75,7 @@ object NamedAddressAtValueExprCompletionProvider: MvCompletionProvider() { object NamedAddressInUseStmtCompletionProvider: MvCompletionProvider() { override val elementPattern: ElementPattern - get() = MvPsiPatterns.path() + get() = MvPsiPattern.path() .and( PlatformPatterns.psiElement() // use path::ident:: diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/PrimitiveTypesCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/PrimitiveTypesCompletionProvider.kt index e8aba70f9..3902eeeec 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/PrimitiveTypesCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/PrimitiveTypesCompletionProvider.kt @@ -9,7 +9,7 @@ import com.intellij.util.ProcessingContext import org.move.ide.annotator.BUILTIN_TYPE_IDENTIFIERS import org.move.ide.annotator.PRIMITIVE_TYPE_IDENTIFIERS import org.move.ide.annotator.SPEC_ONLY_PRIMITIVE_TYPES -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.lang.core.completion.AngleBracketsInsertHandler import org.move.lang.core.completion.PRIMITIVE_TYPE_PRIORITY import org.move.lang.core.completion.withPriority @@ -23,7 +23,7 @@ object PrimitiveTypesCompletionProvider : MvCompletionProvider() { override val elementPattern: ElementPattern get() = - MvPsiPatterns.nameTypeIdentifier() + MvPsiPattern.nameTypeIdentifier() override fun addCompletions( parameters: CompletionParameters, diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/SpecItemCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/SpecItemCompletionProvider.kt index 2fbd6fe24..5db74e8fd 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/SpecItemCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/SpecItemCompletionProvider.kt @@ -3,7 +3,7 @@ package org.move.lang.core.completion.providers import com.intellij.codeInsight.completion.CompletionParameters import com.intellij.codeInsight.completion.CompletionResultSet import com.intellij.util.ProcessingContext -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.lang.core.completion.addSuffix import org.move.lang.core.completion.alreadyHasSpace import org.move.lang.core.completion.createLookupElementWithIcon @@ -13,7 +13,7 @@ import org.move.lang.core.psi.ext.module import org.move.lang.core.psi.ext.mslSpecifiableItems object SpecItemCompletionProvider: MvCompletionProvider() { - override val elementPattern get() = MvPsiPatterns.itemSpecRef() + override val elementPattern get() = MvPsiPattern.itemSpecRef() override fun addCompletions( parameters: CompletionParameters, diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/StructFieldsCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/StructFieldsCompletionProvider.kt index 738ecd0de..b6e4f8a27 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/StructFieldsCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/StructFieldsCompletionProvider.kt @@ -7,7 +7,7 @@ import com.intellij.patterns.PlatformPatterns import com.intellij.patterns.StandardPatterns import com.intellij.psi.PsiElement import com.intellij.util.ProcessingContext -import org.move.lang.core.MvPsiPatterns.bindingPat +import org.move.lang.core.MvPsiPattern.bindingPat import org.move.lang.core.completion.CompletionContext import org.move.lang.core.completion.createLookupElement import org.move.lang.core.psi.* @@ -23,9 +23,9 @@ object StructFieldsCompletionProvider: MvCompletionProvider() { .withParent(), PlatformPatterns .psiElement() - .withParent(), + .withParent(), bindingPat() - .withSuperParent(2), + .withSuperParent(2), ) override fun addCompletions( @@ -41,7 +41,7 @@ object StructFieldsCompletionProvider: MvCompletionProvider() { val completionCtx = CompletionContext(element, element.isMsl()) // val completionCtx = CompletionContext(element, ContextScopeInfo.default()) when (element) { - is MvStructPatField -> { + is MvFieldPat -> { val structPat = element.structPat addFieldsToCompletion( structPat.path.maybeStruct ?: return, diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/StructPatCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/StructPatCompletionProvider.kt index 6bd099935..08983a1d0 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/StructPatCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/StructPatCompletionProvider.kt @@ -33,11 +33,8 @@ object StructPatCompletionProvider: MvCompletionProvider() { val module = bindingPat.containingModule ?: return val completionCtx = CompletionContext(bindingPat, bindingPat.isMsl()) - val moduleBlock = module.moduleBlock - if (moduleBlock != null) { - collectCompletionVariants(result, completionCtx) { - processItemDeclarations(moduleBlock, setOf(Namespace.TYPE), it) - } + collectCompletionVariants(result, completionCtx) { + processItemDeclarations(module, setOf(Namespace.TYPE), it) } } } diff --git a/src/main/kotlin/org/move/lang/core/completion/providers/VectorLiteralCompletionProvider.kt b/src/main/kotlin/org/move/lang/core/completion/providers/VectorLiteralCompletionProvider.kt index 7be53e786..c526b42f1 100644 --- a/src/main/kotlin/org/move/lang/core/completion/providers/VectorLiteralCompletionProvider.kt +++ b/src/main/kotlin/org/move/lang/core/completion/providers/VectorLiteralCompletionProvider.kt @@ -10,15 +10,15 @@ import com.intellij.patterns.PlatformPatterns import com.intellij.psi.PsiElement import com.intellij.util.ProcessingContext import org.move.lang.MvElementTypes -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.lang.core.completion.VECTOR_LITERAL_PRIORITY import org.move.lang.core.psi.MvPath object VectorLiteralCompletionProvider : MvCompletionProvider() { override val elementPattern: ElementPattern - get() = MvPsiPatterns.path() - .andNot(MvPsiPatterns.pathType()) - .andNot(MvPsiPatterns.schemaLit()) + get() = MvPsiPattern.path() + .andNot(MvPsiPattern.pathType()) + .andNot(MvPsiPattern.schemaLit()) .andNot( PlatformPatterns.psiElement() .afterLeaf(PlatformPatterns.psiElement(MvElementTypes.COLON_COLON)) diff --git a/src/main/kotlin/org/move/lang/core/psi/MvFunctionLike.kt b/src/main/kotlin/org/move/lang/core/psi/MvFunctionLike.kt index b085168d8..8d290baf5 100644 --- a/src/main/kotlin/org/move/lang/core/psi/MvFunctionLike.kt +++ b/src/main/kotlin/org/move/lang/core/psi/MvFunctionLike.kt @@ -99,18 +99,14 @@ val MvFunctionLike.module: MvModule? if (moduleStub != null) { moduleStub.psi } else { - this.parent?.parent as? MvModule + this.parent as? MvModule } } // TODO: else -> null } -val MvFunctionLike.script: MvScript? - get() { - val scriptBlock = this.parent ?: return null - return scriptBlock.parent as? MvScript - } +val MvFunctionLike.script: MvScript? get() = this.parent as? MvScript val MvFunctionLike.signatureText: String get() { diff --git a/src/main/kotlin/org/move/lang/core/psi/MvPsiFactory.kt b/src/main/kotlin/org/move/lang/core/psi/MvPsiFactory.kt index acf5b8d59..5caae1985 100644 --- a/src/main/kotlin/org/move/lang/core/psi/MvPsiFactory.kt +++ b/src/main/kotlin/org/move/lang/core/psi/MvPsiFactory.kt @@ -28,12 +28,12 @@ class MvPsiFactory(val project: Project) { } fun structLitField(fieldName: String, expr: String): MvStructLitField = - createFromText("module _M { fun m() { S { $fieldName: $expr }; }}") + createFromText("module 0x1::_M { fun m() { S { $fieldName: $expr }; }}") ?: error("Failed to create MvStructLitField") - fun structPatField(fieldName: String, alias: String): MvStructPatField = - createFromText("module _M { fun m() { let S { $fieldName: $alias } = 1; }}") - ?: error("Failed to create MvStructPatField") + fun fieldPat(fieldName: String, binding: String): MvFieldPat = + createFromText("module 0x1::_M { fun m() { let S { $fieldName: $binding } = 1; }}") + ?: error("Failed to create MvFieldPat") fun schemaLitField(fieldName: String, expr: String): MvSchemaLitField = createFromText("module _M { spec module { include Schema { $fieldName: $expr } }}") @@ -173,7 +173,7 @@ class MvPsiFactory(val project: Project) { MoveFileType, "module 0x0::$moduleName { $text }" ) as MoveFile - val functions = dummyFile.childOfType()?.moduleBlock?.functionList.orEmpty() + val functions = dummyFile.childOfType()?.functionList.orEmpty() return functions } diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvConst.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvConst.kt index 12d0ab650..05bd11251 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvConst.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvConst.kt @@ -12,11 +12,7 @@ import org.move.lang.core.stubs.MvStubbedNamedElementImpl import org.move.lang.core.types.ItemQualName import javax.swing.Icon -val MvConst.module: MvModule? - get() { - val moduleBlock = this.parent - return moduleBlock.parent as? MvModule - } +val MvConst.module: MvModule? get() = this.parent as? MvModule abstract class MvConstMixin : MvStubbedNamedElementImpl, MvConst { diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvStructPatField.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvFieldPat.kt similarity index 61% rename from src/main/kotlin/org/move/lang/core/psi/ext/MvStructPatField.kt rename to src/main/kotlin/org/move/lang/core/psi/ext/MvFieldPat.kt index 325d1c0ed..ff204ec17 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvStructPatField.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvFieldPat.kt @@ -5,19 +5,18 @@ import com.intellij.psi.PsiElement import org.move.lang.core.psi.* import org.move.lang.core.resolve.ref.MvPolyVariantReference -val MvStructPatField.structPat: MvStructPat + +val MvFieldPat.structPat: MvStructPat get() = ancestorStrict()!! -val MvStructPatField.pat: MvPat? - get() { - return this.bindingPat ?: this.structPatFieldBinding?.pat - } +val MvFieldPat.pat: MvPat? get() = + this.bindingPat ?: this.fieldPatBinding?.pat -val MvStructPatField.isShorthand: Boolean get() = this.structPatFieldBinding == null +val MvFieldPat.isShorthand: Boolean get() = this.fieldPatBinding == null -val MvStructPatField.kind: PatFieldKind +val MvFieldPat.kind: PatFieldKind get() = bindingPat?.let { PatFieldKind.Shorthand(it) } - ?: PatFieldKind.Full(this.identifier!!, this.structPatFieldBinding?.pat!!) + ?: PatFieldKind.Full(this.identifier!!, this.fieldPatBinding?.pat!!) // PatField ::= identifier ':' Pat | box? PatBinding sealed class PatFieldKind { @@ -42,9 +41,8 @@ val PatFieldKind.fieldName: String is PatFieldKind.Shorthand -> binding.name } - -abstract class MvStructPatFieldMixin(node: ASTNode): MvElementImpl(node), - MvStructPatField { +abstract class MvFieldPatMixin(node: ASTNode): MvElementImpl(node), + MvFieldPat { override val referenceNameElement: PsiElement get() { val bindingPat = this.bindingPat @@ -56,10 +54,5 @@ abstract class MvStructPatFieldMixin(node: ASTNode): MvElementImpl(node), } override fun getReference(): MvPolyVariantReference = - MvStructRefFieldReferenceImpl(this, shorthand = this.isShorthand) -// return if (this.isShorthand) { -// MvStructPatShorthandFieldReferenceImpl(this) -// } else { -// MvStructRefFieldReferenceImpl(this) -// } + MvFieldReferenceImpl(this, shorthand = this.isShorthand) } diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvFunction.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvFunction.kt index 1cdc86d74..6ab7d9c3f 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvFunction.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvFunction.kt @@ -85,7 +85,7 @@ val MvFunction.outerFileName: String fun MvFunction.innerItemSpecs(): List { val functionName = this.name ?: return emptyList() - val itemSpecs = this.module?.moduleBlock?.itemSpecs().orEmpty() + val itemSpecs = this.module?.itemSpecList.orEmpty() return itemSpecs .filter { it.itemSpecRef?.referenceName == functionName } } @@ -94,7 +94,7 @@ fun MvFunction.outerItemSpecs(): List { val functionName = this.name ?: return emptyList() val moduleSpecs = this.module?.allModuleSpecs().orEmpty() return moduleSpecs - .flatMap { it.moduleSpecBlock?.itemSpecs().orEmpty() } + .flatMap { it.moduleSpecBlock?.itemSpecList.orEmpty() } .filter { it.itemSpecRef?.referenceName == functionName } } diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvItemSpec.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvItemSpec.kt index dd1e81ae8..1558da81d 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvItemSpec.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvItemSpec.kt @@ -17,10 +17,10 @@ val MvModule.mslSpecifiableItems: List val MvItemSpec.module: MvModule? get() { - val block = this.parent - return when (block) { - is MvModuleBlock -> block.module - is MvModuleSpecBlock -> block.moduleSpec.moduleItem + val parent = this.parent + return when (parent) { + is MvModule -> parent + is MvModuleSpecBlock -> parent.moduleSpec.moduleItem else -> error("unreachable") } } diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvItemsOwner.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvItemsOwner.kt index 270d2201b..36419d770 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvItemsOwner.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvItemsOwner.kt @@ -1,5 +1,6 @@ package org.move.lang.core.psi.ext +import com.intellij.psi.PsiComment import org.move.lang.core.psi.* import org.move.stdext.buildList @@ -8,9 +9,14 @@ interface MvItemsOwner: MvElement { } fun MvItemsOwner.items(): Sequence { - return generateSequence(firstChild) { it.nextSibling } + val startChild = when (this) { + is MvModule -> this.lBrace + is MvScript -> this.lBrace + else -> this.firstChild + } + return generateSequence(startChild) { it.nextSibling } .filterIsInstance() - .filter { it !is MvAttr } +// .filter { it !is MvAttr } } val MvItemsOwner.itemElements: List @@ -32,4 +38,5 @@ val MvModule.innerSpecItems: List } } -fun MvItemsOwner.allUseItems(): List = emptyList() \ No newline at end of file +val MvItemsOwner.firstItem: MvElement? + get() = items().firstOrNull { it !is MvAttr } diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvModule.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvModule.kt index 6da77e2fd..8c34062fc 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvModule.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvModule.kt @@ -28,8 +28,7 @@ fun MvModule.addressRef(): MvAddressRef? = val MvModule.friendModules: Set get() { - val moduleBlock = this.moduleBlock ?: return emptySet() - val friendModulePaths = moduleBlock.friendDeclList.mapNotNull { it.path } + val friendModulePaths = this.friendDeclList.mapNotNull { it.path } val friends = mutableSetOf() for (modulePath in friendModulePaths) { val module = modulePath.reference?.resolveFollowingAliases() as? MvModule ?: continue @@ -40,8 +39,7 @@ val MvModule.friendModules: Set fun MvModule.allFunctions(): List { val stub = greenStub - return stub?.childrenStubsOfType()?.map { it.psi } - ?: moduleBlock?.functionList.orEmpty() + return stub?.childrenStubsOfType()?.map { it.psi } ?: functionList } fun MvModule.allNonTestFunctions(): List = @@ -90,25 +88,20 @@ fun MvModule.entryFunctions(): List = this.allFunctions().filter { i fun MvModule.viewFunctions(): List = this.allFunctions().filter { it.isView } fun MvModule.specInlineFunctions(): List = - this.moduleItemSpecs().flatMap { it.specInlineFunctions() } + this.moduleItemSpecList.flatMap { it.specInlineFunctions() } fun builtinSpecFunction(text: String, project: Project): MvSpecFunction { val trimmedText = text.trimIndent() return project.psiFactory.specFunction(trimmedText, moduleName = "builtin_spec_functions") } -fun MvModule.enums(): List = this.moduleBlock?.enumList.orEmpty() - fun MvModule.structs(): List { return getProjectPsiDependentCache(this) { val stub = it.greenStub - stub?.childrenStubsOfType()?.map { s -> s.psi } - ?: it.moduleBlock?.structList.orEmpty() + stub?.childrenStubsOfType()?.map { s -> s.psi } ?: it.structList } } -fun MvModule.schemas(): List = moduleBlock?.schemaList.orEmpty() - fun MvModule.builtinSpecFunctions(): List { return getProjectPsiDependentCache(this) { val project = it.project @@ -141,11 +134,9 @@ fun MvModule.builtinSpecFunctions(): List { } } -fun MvModule.specFunctions(): List = moduleBlock?.specFunctionList.orEmpty() - -fun MvModule.consts(): List = this.moduleBlock?.constList.orEmpty() +fun MvModule.specFunctions(): List = specFunctionList.orEmpty() -val MvModuleBlock.module: MvModule get() = this.parent as MvModule +fun MvModule.consts(): List = this.constList //fun MvModuleBlock.moduleItemSpecs() = this.moduleItemSpecList //// this.childrenOfType() @@ -155,17 +146,6 @@ val MvModuleSpec.moduleItem: MvModule? get() = this.path?.reference?.resolve() a val MvModuleSpecBlock.moduleSpec: MvModuleSpec get() = this.parent as MvModuleSpec -fun MvModuleBlock.itemSpecs() = this.childrenOfType() - -fun MvModuleSpecBlock.itemSpecs() = this.childrenOfType() - -//fun MvModuleSpecBlock.moduleItemSpecs() = -// this.itemSpecs() -// .filter { it.itemSpecRef?.moduleKw != null } - -fun MvModule.moduleItemSpecs(): List = - this.moduleBlock?.moduleItemSpecList.orEmpty() - fun MvModuleSpec.moduleItemSpecs(): List = this.moduleSpecBlock?.moduleItemSpecList.orEmpty() diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvSchema.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvSchema.kt index a22f1d901..49c0c2f32 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvSchema.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvSchema.kt @@ -14,19 +14,13 @@ import org.move.lang.core.types.ty.TyUnknown val MvSchema.specBlock: MvSpecCodeBlock? get() = this.childOfType() -val MvSchema.module: MvModule? - get() { - val moduleBlock = this.parent - return moduleBlock.parent as? MvModule - } +val MvSchema.module: MvModule? get() = this.parent as? MvModule val MvSchema.requiredTypeParams: List get() { val usedTypeParams = mutableSetOf() -// val inferenceCtx = InferenceContext.default(true, this) this.fieldStmts .map { it.type?.loweredType(true) ?: TyUnknown } -// .map { it.annotationTy(inferenceCtx) } .forEach { it.foldTyTypeParameterWith { paramTy -> usedTypeParams.add(paramTy.origin); paramTy } } diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvScript.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvScript.kt deleted file mode 100644 index 75d086042..000000000 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvScript.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.move.lang.core.psi.ext - -import org.move.lang.core.psi.MvConst -import org.move.lang.core.psi.MvFunction -import org.move.lang.core.psi.MvScript - -fun MvScript.allFunctions(): List = scriptBlock?.functionList.orEmpty() - -fun MvScript.consts(): List = scriptBlock?.constList.orEmpty() - -//fun MvScriptDef.builtinFunctions(): List { -// return listOf( -// createBuiltinFunction("native fun assert(_: bool, err: u64);", project) -// ) -//} - -//abstract class MvScriptMixin(node: ASTNode) : MvElementImpl(node), -// MvScript diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvSpecFunction.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvSpecFunction.kt index 0a0116c6e..c5edc09d8 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvSpecFunction.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvSpecFunction.kt @@ -14,14 +14,7 @@ import org.move.lang.core.stubs.MvStubbedNamedElementImpl import org.move.lang.core.types.ItemQualName import javax.swing.Icon -val MvSpecFunction.module: MvModule? - get() { -// val moduleStub = greenStub?.parentStub as? MvModuleStub -// if (moduleStub != null) { -// return moduleStub.psi -// } - return this.parent?.parent as? MvModule - } +val MvSpecFunction.module: MvModule? get() = this.parent as? MvModule abstract class MvSpecFunctionMixin : MvStubbedNamedElementImpl, MvSpecFunction { diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvStruct.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvStruct.kt index beb0bf3ca..c484fbf1c 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvStruct.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvStruct.kt @@ -42,8 +42,7 @@ val MvStruct.module: MvModule if (moduleStub != null) { return moduleStub.psi } - val moduleBlock = this.parent - return moduleBlock.parent as MvModule + return this.parent as MvModule } val MvStruct.psiAbilities: List diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvStructLitField.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvStructLitField.kt index 2e88923d7..70a027bc8 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvStructLitField.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvStructLitField.kt @@ -24,18 +24,18 @@ inline fun MvStructLitField.resolveToElement(): T? = fun MvStructLitField.resolveToDeclaration(): MvNamedFieldDecl? = resolveToElement() fun MvStructLitField.resolveToBinding(): MvBindingPat? = resolveToElement() -interface MvStructRefField: MvMandatoryReferenceElement +interface MvFieldRef: MvMandatoryReferenceElement abstract class MvStructLitFieldMixin(node: ASTNode): MvElementImpl(node), MvStructLitField { override fun getReference(): MvPolyVariantReference = - MvStructRefFieldReferenceImpl(this, shorthand = this.isShorthand) + MvFieldReferenceImpl(this, shorthand = this.isShorthand) } -class MvStructRefFieldReferenceImpl( - element: MvStructRefField, +class MvFieldReferenceImpl( + element: MvFieldRef, var shorthand: Boolean, -): MvPolyVariantReferenceCached(element) { +): MvPolyVariantReferenceCached(element) { override fun multiResolveInner(): List { val referenceName = element.referenceName @@ -50,7 +50,7 @@ class MvStructRefFieldReferenceImpl( } fun processStructRefFieldResolveVariants( - fieldRef: MvStructRefField, + fieldRef: MvFieldRef, processor: RsResolveProcessor ): Boolean { val fieldsOwnerItem = fieldRef.fieldOwner ?: return false @@ -60,10 +60,10 @@ fun processStructRefFieldResolveVariants( } } -private val MvStructRefField.fieldOwner: MvFieldsOwner? +private val MvFieldRef.fieldOwner: MvFieldsOwner? get() { return when (this) { - is MvStructPatField -> { + is MvFieldPat -> { this.structPat.path.reference?.resolveFollowingAliases() as? MvFieldsOwner } is MvStructLitField -> { diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/MvStructPat.kt b/src/main/kotlin/org/move/lang/core/psi/ext/MvStructPat.kt index c97d7fed9..064ea6f9c 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/MvStructPat.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/MvStructPat.kt @@ -2,14 +2,9 @@ package org.move.lang.core.psi.ext import org.move.lang.core.psi.MvStruct import org.move.lang.core.psi.MvStructPat -import org.move.lang.core.psi.MvStructPatField - -val MvStructPat.patFields: List - get() = - structPatFieldsBlock.structPatFieldList val MvStructPat.patFieldNames: List get() = - patFields.map { it.referenceName } + fieldPatList.map { it.referenceName } val MvStructPat.structItem: MvStruct? get() = this.path.reference?.resolveFollowingAliases() as? MvStruct diff --git a/src/main/kotlin/org/move/lang/core/psi/ext/PsiElement.kt b/src/main/kotlin/org/move/lang/core/psi/ext/PsiElement.kt index e30821c9a..6b07bc495 100644 --- a/src/main/kotlin/org/move/lang/core/psi/ext/PsiElement.kt +++ b/src/main/kotlin/org/move/lang/core/psi/ext/PsiElement.kt @@ -270,6 +270,9 @@ fun PsiElement?.getPrevNonWhitespaceSibling(): PsiElement? = fun PsiElement?.getNextNonWhitespaceSibling(): PsiElement? = PsiTreeUtil.skipWhitespacesForward(this) +val PsiElement.prevNonWsSibling get() = getPrevNonWhitespaceSibling() +val PsiElement.nextNonWsSibling get() = getNextNonWhitespaceSibling() + fun PsiElement.isWhitespace(): Boolean = this is PsiWhiteSpace || this is PsiComment diff --git a/src/main/kotlin/org/move/lang/core/resolve2/ItemResolution.kt b/src/main/kotlin/org/move/lang/core/resolve2/ItemResolution.kt index 4bf76119f..f0bff52c7 100644 --- a/src/main/kotlin/org/move/lang/core/resolve2/ItemResolution.kt +++ b/src/main/kotlin/org/move/lang/core/resolve2/ItemResolution.kt @@ -63,8 +63,8 @@ fun processItemDeclarations( // 1. loop over all items in module (item is anything accessible with MODULE:: ) // 2. for every item, use it's .visibility to create VisibilityFilter, even it's just a { false } val items = itemsOwner.itemElements + - (itemsOwner as? MvModuleBlock)?.module?.innerSpecItems.orEmpty() + - (itemsOwner as? MvModuleBlock)?.module?.let { getItemsFromModuleSpecs(it, ns) }.orEmpty() + (itemsOwner as? MvModule)?.innerSpecItems.orEmpty() + + (itemsOwner as? MvModule)?.let { getItemsFromModuleSpecs(it, ns) }.orEmpty() for (item in items) { val name = item.name ?: continue diff --git a/src/main/kotlin/org/move/lang/core/resolve2/LexicalDeclarations2.kt b/src/main/kotlin/org/move/lang/core/resolve2/LexicalDeclarations2.kt index ac6dd6c39..b8331f7ed 100644 --- a/src/main/kotlin/org/move/lang/core/resolve2/LexicalDeclarations2.kt +++ b/src/main/kotlin/org/move/lang/core/resolve2/LexicalDeclarations2.kt @@ -21,16 +21,16 @@ fun processItemsInScope( val stop = when (namespace) { Namespace.NAME -> { val found = when (scope) { - is MvModuleBlock -> { - val module = scope.parent as MvModule + is MvModule -> { +// val module = scope.parent as MvModule processor.processAllItems( ns, - module.structs(), - module.consts(), + scope.structs(), + scope.consts(), ) } is MvModuleSpecBlock -> processor.processAllItems(ns, scope.schemaList) - is MvScript -> processor.processAllItems(ns, scope.consts()) + is MvScript -> processor.processAllItems(ns, scope.constList) is MvFunctionLike -> processor.processAll(scope.allParamsAsBindings) is MvLambdaExpr -> processor.processAll(scope.bindingPatList) is MvForExpr -> { @@ -130,15 +130,14 @@ fun processItemsInScope( } Namespace.FUNCTION -> { val found = when (scope) { - is MvModuleBlock -> { - val module = scope.parent as MvModule + is MvModule -> { val specFunctions = - listOf(module.specFunctions(), module.builtinSpecFunctions()).flatten() - val specInlineFunctions = module.moduleItemSpecs().flatMap { it.specInlineFunctions() } + listOf(scope.specFunctions(), scope.builtinSpecFunctions()).flatten() + val specInlineFunctions = scope.moduleItemSpecList.flatMap { it.specInlineFunctions() } processor.processAllItems( ns, - module.builtinFunctions(), - module.allNonTestFunctions(), + scope.builtinFunctions(), + scope.allNonTestFunctions(), specFunctions, specInlineFunctions ) @@ -183,12 +182,11 @@ fun processItemsInScope( false } } - is MvModuleBlock -> { - val module = scope.parent as MvModule + is MvModule -> { processor.processAllItems( ns, - module.structs(), - module.enums() + scope.structs(), + scope.enumList ) } is MvApplySchemaStmt -> { @@ -204,7 +202,7 @@ fun processItemsInScope( } Namespace.SCHEMA -> when (scope) { - is MvModuleBlock -> processor.processAllItems(ns, scope.schemaList) + is MvModule -> processor.processAllItems(ns, scope.schemaList) is MvModuleSpecBlock -> processor.processAllItems(ns, scope.schemaList, scope.specFunctionList) else -> false } diff --git a/src/main/kotlin/org/move/lang/core/resolve2/NameResolution2.kt b/src/main/kotlin/org/move/lang/core/resolve2/NameResolution2.kt index 1e71eaf9e..1f8b9ecab 100644 --- a/src/main/kotlin/org/move/lang/core/resolve2/NameResolution2.kt +++ b/src/main/kotlin/org/move/lang/core/resolve2/NameResolution2.kt @@ -136,22 +136,22 @@ fun walkUpThroughScopes( if (handleScope(cameFrom, scope)) return true // walk all items in original module block - if (scope is MvModuleBlock) { + if (scope is MvModule) { // handle spec module {} - if (handleModuleItemSpecsInBlock(cameFrom, scope, handleScope)) return true + if (handleModuleItemSpecsInItemsOwner(cameFrom, scope, handleScope)) return true // walk over all spec modules - for (moduleSpec in scope.module.allModuleSpecs()) { + for (moduleSpec in scope.allModuleSpecs()) { val moduleSpecBlock = moduleSpec.moduleSpecBlock ?: continue if (handleScope(cameFrom, moduleSpecBlock)) return true - if (handleModuleItemSpecsInBlock(cameFrom, moduleSpecBlock, handleScope)) return true + if (handleModuleItemSpecsInItemsOwner(cameFrom, moduleSpecBlock, handleScope)) return true } } if (scope is MvModuleSpecBlock) { - val moduleBlock = scope.moduleSpec.moduleItem?.moduleBlock - if (moduleBlock != null) { + val module = scope.moduleSpec.moduleItem + if (module != null) { cameFrom = scope - scope = moduleBlock + scope = module continue } } @@ -165,14 +165,14 @@ fun walkUpThroughScopes( return false } -private fun handleModuleItemSpecsInBlock( +private fun handleModuleItemSpecsInItemsOwner( cameFrom: MvElement, - block: MvElement, + itemsOwner: MvItemsOwner, handleScope: (cameFrom: MvElement, scope: MvElement) -> Boolean ): Boolean { - val moduleItemSpecs = when (block) { - is MvModuleBlock -> block.moduleItemSpecList - is MvModuleSpecBlock -> block.moduleItemSpecList + val moduleItemSpecs = when (itemsOwner) { + is MvModule -> itemsOwner.moduleItemSpecList + is MvModuleSpecBlock -> itemsOwner.moduleItemSpecList else -> emptyList() } for (moduleItemSpec in moduleItemSpecs.filter { it != cameFrom }) { diff --git a/src/main/kotlin/org/move/lang/core/resolve2/ref/Path2ReferenceImpl.kt b/src/main/kotlin/org/move/lang/core/resolve2/ref/Path2ReferenceImpl.kt index 1407c21ff..695968f2a 100644 --- a/src/main/kotlin/org/move/lang/core/resolve2/ref/Path2ReferenceImpl.kt +++ b/src/main/kotlin/org/move/lang/core/resolve2/ref/Path2ReferenceImpl.kt @@ -102,10 +102,9 @@ fun processQualifiedPathResolveVariants( } if (resolvedQualifier is MvModule) { if (processor.process("Self", resolvedQualifier)) return true - val moduleBlock = resolvedQualifier.moduleBlock - if (moduleBlock != null) { - if (processItemDeclarations(moduleBlock, ns, processor)) return true - } + + val module = resolvedQualifier + if (processItemDeclarations(module, ns, processor)) return true } if (resolvedQualifier is MvEnum) { if (processor.processAll(resolvedQualifier.variants)) return true diff --git a/src/main/kotlin/org/move/lang/core/types/infer/Patterns.kt b/src/main/kotlin/org/move/lang/core/types/infer/Patterns.kt index e3f9e7e36..bb80a5b8a 100644 --- a/src/main/kotlin/org/move/lang/core/types/infer/Patterns.kt +++ b/src/main/kotlin/org/move/lang/core/types/infer/Patterns.kt @@ -78,8 +78,8 @@ fun MvPat.collectBindings(fctx: TypeInferenceWalker, ty: Ty) { fctx.reportTypeError(TypeError.InvalidUnpacking(this, ty)) } val structFields = structItem.fields.associateBy { it.name } - for (patField in this.patFields) { - val kind = patField.kind + for (fieldPat in this.fieldPatList) { + val kind = fieldPat.kind val fieldType = structFields[kind.fieldName] ?.type ?.loweredType(fctx.msl) diff --git a/src/main/kotlin/org/move/toml/NamedAddressReferenceContributor.kt b/src/main/kotlin/org/move/toml/NamedAddressReferenceContributor.kt index 7e4ac3b3c..1d06bd040 100644 --- a/src/main/kotlin/org/move/toml/NamedAddressReferenceContributor.kt +++ b/src/main/kotlin/org/move/toml/NamedAddressReferenceContributor.kt @@ -2,7 +2,7 @@ package org.move.toml import com.intellij.psi.* import com.intellij.util.ProcessingContext -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.lang.core.psi.MvNamedAddress import org.move.lang.core.resolve.ref.NamedAddressReference @@ -19,7 +19,7 @@ class NamedAddressReferenceProvider : PsiReferenceProvider() { class NamedAddressReferenceContributor : PsiReferenceContributor() { override fun registerReferenceProviders(registrar: PsiReferenceRegistrar) { registrar.registerReferenceProvider( - MvPsiPatterns.namedAddress(), NamedAddressReferenceProvider() + MvPsiPattern.namedAddress(), NamedAddressReferenceProvider() ) } } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index e7bc6e6ed..39d7e07c9 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -352,11 +352,11 @@ org.move.ide.intentions.RemoveCurlyBracesIntention Move - - Move - org.move.ide.intentions.InlineAddressBlockIntention - Move - + + + + + Move org.move.ide.intentions.ChopParameterListIntention @@ -377,11 +377,6 @@ org.move.ide.intentions.ChopStructLiteralIntention Move - - Move - org.move.ide.intentions.ChopStructPatIntention - Move - diff --git a/src/test/kotlin/org/move/ide/intentions/ChopStructPatIntentionTest.kt b/src/test/kotlin/org/move/ide/intentions/ChopStructPatIntentionTest.kt deleted file mode 100644 index 12aba033f..000000000 --- a/src/test/kotlin/org/move/ide/intentions/ChopStructPatIntentionTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.move.ide.intentions - -import org.move.utils.tests.MvIntentionTestCase - -class ChopStructPatIntentionTest: MvIntentionTestCase(ChopStructPatIntention::class) { - fun `test separate lines for test attributes`() = doAvailableTest(""" - module 0x1::M { - struct S { val1: u8, val2: u8 } - fun test_my_function() { - let S { val1: u8, /*caret*/val2: u8 } = call(); - } - } - """, """ - module 0x1::M { - struct S { val1: u8, val2: u8 } - fun test_my_function() { - let S { - val1: u8, - val2: u8 - } = call(); - } - } - """) -} diff --git a/src/test/kotlin/org/move/ide/intentions/InlineAddressBlockIntentionTest.kt b/src/test/kotlin/org/move/ide/intentions/InlineAddressBlockIntentionTest.kt deleted file mode 100644 index 3ed9d0ae1..000000000 --- a/src/test/kotlin/org/move/ide/intentions/InlineAddressBlockIntentionTest.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.move.ide.intentions - -import org.move.utils.tests.MvIntentionTestCase - -class InlineAddressBlockIntentionTest: MvIntentionTestCase(InlineAddressBlockIntention::class) { - fun `test convert address block into inline`() = doAvailableTest(""" - address 0x1 { - module/*caret*/ M {} - } - """, """ - module 0x1::M {/*caret*/} - """) -} diff --git a/src/test/kotlin/org/move/lang/completion/KeywordCompletionTest.kt b/src/test/kotlin/org/move/lang/completion/KeywordCompletionTest.kt index bb790b702..105356ef4 100644 --- a/src/test/kotlin/org/move/lang/completion/KeywordCompletionTest.kt +++ b/src/test/kotlin/org/move/lang/completion/KeywordCompletionTest.kt @@ -50,15 +50,11 @@ class KeywordCompletionTest: CompletionTestCase() { """ ) - fun `test module in address`() = doSingleCompletion( + fun `test module at top level`() = doSingleCompletion( """ - address 0x0 { - mod/*caret*/ - } + mod/*caret*/ """, """ - address 0x0 { - module /*caret*/ - } + module /*caret*/ """ ) @@ -650,4 +646,34 @@ class KeywordCompletionTest: CompletionTestCase() { } """ ) + + fun `test enum completion`() = doSingleCompletion( + """ + module 0x1::m { + enu/*caret*/ + } + """, + """ + module 0x1::m { + enum /*caret*/ + } + """, + ) + + fun `test match completion`() = doSingleCompletion( + """ + module 0x1::m { + fun main() { + mat/*caret*/ + } + } + """, + """ + module 0x1::m { + fun main() { + match /*caret*/ + } + } + """, + ) } diff --git a/src/test/kotlin/org/move/lang/completion/PsiPatternTest.kt b/src/test/kotlin/org/move/lang/completion/MvPsiPatternTest.kt similarity index 57% rename from src/test/kotlin/org/move/lang/completion/PsiPatternTest.kt rename to src/test/kotlin/org/move/lang/completion/MvPsiPatternTest.kt index 4238f19d2..191956a12 100644 --- a/src/test/kotlin/org/move/lang/completion/PsiPatternTest.kt +++ b/src/test/kotlin/org/move/lang/completion/MvPsiPatternTest.kt @@ -3,20 +3,20 @@ package org.move.lang.completion import com.intellij.patterns.ElementPattern import com.intellij.psi.PsiElement import org.intellij.lang.annotations.Language -import org.move.lang.core.MvPsiPatterns +import org.move.lang.core.MvPsiPattern import org.move.utils.tests.InlineFile import org.move.utils.tests.MvTestBase import org.move.utils.tests.base.findElementInEditor -class PsiPatternTest : MvTestBase() { +class MvPsiPatternTest : MvTestBase() { fun `test on stmt beginning`() = testPattern(""" //^ - """, MvPsiPatterns.onStmtBeginning) + """, MvPsiPattern.onStatementBeginning()) fun `test on stmt beginning with words`() = testPattern(""" word2 //^ - """, MvPsiPatterns.onStmtBeginning("word1", "word2")) + """, MvPsiPattern.onStatementBeginning("word1", "word2")) fun `test on stmt beginning after other statement`() = testPattern(""" script { @@ -25,27 +25,27 @@ class PsiPatternTest : MvTestBase() { //^ } } - """, MvPsiPatterns.onStmtBeginning) + """, MvPsiPattern.onStatementBeginning()) fun `test on stmt beginning after block`() = testPattern(""" module Foo {} //^ - """, MvPsiPatterns.onStmtBeginning) + """, MvPsiPattern.onStatementBeginning()) fun `test on stmt beginning ignores comments`() = testPattern(""" script {} /* three */ /* it's greater than two */ //^ - """, MvPsiPatterns.onStmtBeginning) + """, MvPsiPattern.onStatementBeginning()) fun `test on stmt beginning negative in middle of other stmt`() = testPatternNegative(""" module Abc {} //^ - """, MvPsiPatterns.onStmtBeginning) + """, MvPsiPattern.onStatementBeginning()) fun `test on stmt beginning negative when not correct startword`() = testPatternNegative(""" module //^ - """, MvPsiPatterns.onStmtBeginning("script")) + """, MvPsiPattern.onStatementBeginning("script")) fun `test code statement`() = testPattern(""" module M { @@ -54,7 +54,7 @@ class PsiPatternTest : MvTestBase() { //^ } } - """, MvPsiPatterns.codeStmt()) + """, MvPsiPattern.codeStatementPattern()) fun `test code statement nested`() = testPattern(""" module M { @@ -65,7 +65,41 @@ class PsiPatternTest : MvTestBase() { }}} } } - """, MvPsiPatterns.codeStmt()) + """, MvPsiPattern.codeStatementPattern()) + + fun `test no code statement in module`() = testPatternNegative(""" + module 0x1::m { + le + //^ + } + """, MvPsiPattern.codeStatementPattern()) + + fun `test no code statement in struct pat`() = testPatternNegative(""" + module 0x1::m { + fun main() { + let S { le } = 1; + //^ + } + } + """, MvPsiPattern.codeStatementPattern()) + + fun `test no code statement in struct lit`() = testPatternNegative(""" + module 0x1::m { + fun main() { + let s = S { le }; + //^ + } + } + """, MvPsiPattern.codeStatementPattern()) + + fun `test code statement allowed in initializer of struct lit`() = testPattern(""" + module 0x1::m { + fun main() { + let s = S { field: le }; + //^ + } + } + """, MvPsiPattern.codeStatementPattern()) fun `test borrow type`() = testPattern(""" script { @@ -73,7 +107,14 @@ class PsiPatternTest : MvTestBase() { //^ } } - """, MvPsiPatterns.pathType()) + """, MvPsiPattern.pathType()) + + fun `test module`() = testPattern(""" + module 0x1::m { + lelele + //^ + } + """, MvPsiPattern.module()) private inline fun testPattern( @Language("Move") code: String, diff --git a/src/test/resources/org/move/ide/formatter.fixtures/structs.move b/src/test/resources/org/move/ide/formatter.fixtures/structs.move index c34a74b12..e29559941 100644 --- a/src/test/resources/org/move/ide/formatter.fixtures/structs.move +++ b/src/test/resources/org/move/ide/formatter.fixtures/structs.move @@ -2,12 +2,6 @@ module M { struct MyStruct { a: u8, b: u8, -c: u8, - } - - resource struct MyStruct { - a: u8, - b: u8, c: u8, } } diff --git a/src/test/resources/org/move/ide/formatter.fixtures/structs_after.move b/src/test/resources/org/move/ide/formatter.fixtures/structs_after.move index 2bdc45ccf..7035a3e7f 100644 --- a/src/test/resources/org/move/ide/formatter.fixtures/structs_after.move +++ b/src/test/resources/org/move/ide/formatter.fixtures/structs_after.move @@ -4,12 +4,6 @@ module M { b: u8, c: u8, } - - resource struct MyStruct { - a: u8, - b: u8, - c: u8, - } } module M2 { diff --git a/src/test/resources/org/move/lang/parser/complete/access_control.txt b/src/test/resources/org/move/lang/parser/complete/access_control.txt index 56ea09ea5..42870db1d 100644 --- a/src/test/resources/org/move/lang/parser/complete/access_control.txt +++ b/src/test/resources/org/move/lang/parser/complete/access_control.txt @@ -7,557 +7,556 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('access_control') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f1') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f1') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(reads_kw)('reads') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(reads_kw)('reads') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f3') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f3') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(writes_kw)('writes') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(writes_kw)('writes') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f4') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) - PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - PsiElement(*)('*') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f4') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + PsiElement(*)('*') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f_multiple') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f_multiple') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(reads_kw)('reads') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(writes_kw)('writes') PsiWhiteSpace(' ') - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(reads_kw)('reads') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + PsiWhiteSpace(' ') + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(reads_kw)('reads') PsiWhiteSpace(' ') - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(writes_kw)('writes') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('G') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f5') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') PsiWhiteSpace(' ') - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(reads_kw)('reads') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('G') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f5') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x42') - PsiElement(::)('::') - PsiElement(*)('*') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x42') PsiElement(::)('::') PsiElement(*)('*') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f6') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) + PsiElement(::)('::') + PsiElement(*)('*') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f6') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x42') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x42') PsiElement(::)('::') + PsiElement(IDENTIFIER)('m') + PsiElement(::)('::') + PsiElement(*)('*') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f7') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(*)('*') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) PsiElement(*)('*') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f7') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f8') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(*)('*') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvAddressSpecifierLitImpl(ADDRESS_SPECIFIER_LIT) + PsiElement(DIEM_ADDRESS)('0x42') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f9') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(*)('*') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) - PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - PsiElement(*)('*') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f8') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(*)('*') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + PsiElement(IDENTIFIER)('a') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f10') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('param') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(*)('*') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(*)('*') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('make_up_address') PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - MvAddressSpecifierLitImpl(ADDRESS_SPECIFIER_LIT) - PsiElement(DIEM_ADDRESS)('0x42') + MvAddressSpecifierCallParamImpl(ADDRESS_SPECIFIER_CALL_PARAM) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('param') PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f9') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('make_up_address') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(*)('*') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) - PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - PsiElement(IDENTIFIER)('a') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f10') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('param') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(acquires)('acquires') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x42') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f11') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(!)('!') + PsiElement(reads_kw)('reads') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(*)('*') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvAddressSpecifierLitImpl(ADDRESS_SPECIFIER_LIT) + PsiElement(DIEM_ADDRESS)('0x42') + PsiElement())(')') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(*)('*') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) - PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('make_up_address') - PsiElement(()('(') - MvAddressSpecifierCallParamImpl(ADDRESS_SPECIFIER_CALL_PARAM) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('param') - PsiElement())(')') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('make_up_address') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(*)('*') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvAddressSpecifierLitImpl(ADDRESS_SPECIFIER_LIT) + PsiElement(DIEM_ADDRESS)('0x43') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f12') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(pure_kw)('pure') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ok2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('s') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + PsiElement(IDENTIFIER)('signer') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(reads_kw)('reads') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x42') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f11') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(!)('!') - PsiElement(reads_kw)('reads') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(*)('*') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) - PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - MvAddressSpecifierLitImpl(ADDRESS_SPECIFIER_LIT) - PsiElement(DIEM_ADDRESS)('0x42') - PsiElement())(')') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(*)('*') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) - PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) - MvAddressSpecifierLitImpl(ADDRESS_SPECIFIER_LIT) - PsiElement(DIEM_ADDRESS)('0x43') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f12') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(pure_kw)('pure') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ok2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('s') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('signer') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(reads_kw)('reads') - PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('signer') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('address_of') PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvAddressSpecifierCallParamImpl(ADDRESS_SPECIFIER_CALL_PARAM) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('signer') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('address_of') - PsiElement(()('(') - MvAddressSpecifierCallParamImpl(ADDRESS_SPECIFIER_CALL_PARAM) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('s') - PsiElement())(')') + PsiElement(IDENTIFIER)('s') PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ok2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('s') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('signer') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) - MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) - PsiElement(reads_kw)('reads') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ok2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('s') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) - MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(IDENTIFIER)('signer') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvResourceAccessItemListImpl(RESOURCE_ACCESS_ITEM_LIST) + MvResourceAccessItemImpl(RESOURCE_ACCESS_ITEM) + PsiElement(reads_kw)('reads') + PsiWhiteSpace(' ') + MvAccessSpecifierListImpl(ACCESS_SPECIFIER_LIST) + MvAccessSpecifierImpl(ACCESS_SPECIFIER) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + MvAddressSpecifierImpl(ADDRESS_SPECIFIER) + PsiElement(()('(') + MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address_of') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') PsiElement(()('(') - MvAddressSpecifierArgImpl(ADDRESS_SPECIFIER_ARG) + MvAddressSpecifierCallParamImpl(ADDRESS_SPECIFIER_CALL_PARAM) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address_of') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(()('(') - MvAddressSpecifierCallParamImpl(ADDRESS_SPECIFIER_CALL_PARAM) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('s') - PsiElement())(')') + PsiElement(IDENTIFIER)('s') PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/addresses.txt b/src/test/resources/org/move/lang/parser/complete/addresses.txt index c5a2b2729..0cbf2275c 100644 --- a/src/test/resources/org/move/lang/parser/complete/addresses.txt +++ b/src/test/resources/org/move/lang/parser/complete/addresses.txt @@ -31,121 +31,120 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(INTEGER_LITERAL)('01') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x0000') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x00001111') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(BECH32_ADDRESS)('wallet1pxqfjvnu0utauj8fctw2s7j4mfyvrsjd59c2u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(POLKADOT_ADDRESS)('5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - MvNamedAddressImpl(NAMED_ADDRESS) - PsiElement(IDENTIFIER)('Std') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(PLACEHOLDER_ADDRESS)('{{alice}}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - MvNamedAddressImpl(NAMED_ADDRESS) - PsiElement(IDENTIFIER)('DiemFramework') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x89b9f9d1fadc027cf9532d6f9904152222331122') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x89b9f9d1fadc027cf9532d6f9904152289b9f9d1fadc027cf9532d6f99041522') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(INTEGER_LITERAL)('01') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x0000') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x00001111') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(BECH32_ADDRESS)('wallet1pxqfjvnu0utauj8fctw2s7j4mfyvrsjd59c2u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(POLKADOT_ADDRESS)('5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + MvNamedAddressImpl(NAMED_ADDRESS) + PsiElement(IDENTIFIER)('Std') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(PLACEHOLDER_ADDRESS)('{{alice}}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + MvNamedAddressImpl(NAMED_ADDRESS) + PsiElement(IDENTIFIER)('DiemFramework') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x89b9f9d1fadc027cf9532d6f9904152222331122') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x89b9f9d1fadc027cf9532d6f9904152289b9f9d1fadc027cf9532d6f99041522') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') PsiWhiteSpace('\n\n') MvAddressDefImpl(ADDRESS_DEF) PsiElement(address_kw)('address') @@ -161,9 +160,8 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') PsiWhiteSpace('\n\n') @@ -181,9 +179,8 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') PsiWhiteSpace('\n\n') @@ -201,9 +198,8 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') PsiWhiteSpace('\n\n') @@ -222,10 +218,9 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M1') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n\n') - PsiElement(})('}') + PsiElement({)('{') + PsiWhiteSpace('\n\n') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') PsiWhiteSpace('\n\n') @@ -237,9 +232,8 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M2') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') MvModuleImpl(MODULE) PsiElement(module)('module') @@ -250,6 +244,5 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M2') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement({)('{') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/annotated_literals.txt b/src/test/resources/org/move/lang/parser/complete/annotated_literals.txt index 0a7101aec..41e6ac29d 100644 --- a/src/test/resources/org/move/lang/parser/complete/annotated_literals.txt +++ b/src/test/resources/org/move/lang/parser/complete/annotated_literals.txt @@ -2,111 +2,110 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x1') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u128') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x1u128') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u128') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('000001') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u128') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10000') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x1') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u128') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x1u128') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u128') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('000001') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u128') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10000') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/assignments.txt b/src/test/resources/org/move/lang/parser/complete/assignments.txt index 634ba076c..1cba1efdb 100644 --- a/src/test/resources/org/move/lang/parser/complete/assignments.txt +++ b/src/test/resources/org/move/lang/parser/complete/assignments.txt @@ -2,36 +2,93 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('3') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('3') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('record') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('val') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('record') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('val') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(>)('>') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') MvAssignmentExprImpl(ASSIGNMENT_EXPR) MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) @@ -46,69 +103,32 @@ FILE PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('record') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('val') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('operator') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(>)('>') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('record') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('val') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('11') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) @@ -119,90 +139,69 @@ FILE PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) PsiElement(IDENTIFIER)('operator') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('main') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('11') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('operator') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('main') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('11') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Coin') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('11') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Coin') - PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('val') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('val') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Coin') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Coin') + PsiWhiteSpace(' ') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('_') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/attributes.txt b/src/test/resources/org/move/lang/parser/complete/attributes.txt index 4167aadae..3e43a4e38 100644 --- a/src/test/resources/org/move/lang/parser/complete/attributes.txt +++ b/src/test/resources/org/move/lang/parser/complete/attributes.txt @@ -14,418 +14,417 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('SomeOtherModule') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(const_kw)('const') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MY_CONST') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('SomeStruct') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('SomeOtherModule') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MY_CONST') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(native)('native') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - PsiElement(struct_kw)('struct') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('SomeStruct') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('S') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test') + PsiElement(])(']') + PsiWhiteSpace('\n ') + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('expected_failure') + PsiElement(])(']') + PsiWhiteSpace('\n ') + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('S') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test') - PsiElement(])(']') - PsiWhiteSpace('\n ') - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('expected_failure') - PsiElement(])(']') - PsiWhiteSpace('\n ') - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test') - PsiElement(,)(',') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('expected_failure') PsiWhiteSpace(' ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('expected_failure') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('type_name') + PsiElement(IDENTIFIER)('std') PsiElement(::)('::') - PsiElement(IDENTIFIER)('ENonModuleType') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('attr1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('attr2') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + PsiElement(IDENTIFIER)('type_name') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('ENonModuleType') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('attr1') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('a') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('attr2') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(,)(',') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('b') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x2') - PsiElement(,)(',') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x2') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('c') PsiWhiteSpace(' ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('c') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - MvNamedAddressImpl(NAMED_ADDRESS) - PsiElement(IDENTIFIER)('Std') - PsiElement())(')') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main3') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test_empty_parens') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('show') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('book_orders_sdk') - PsiElement(,)(',') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + MvNamedAddressImpl(NAMED_ADDRESS) + PsiElement(IDENTIFIER)('Std') + PsiElement())(')') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main3') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test_empty_parens') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('show') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('book_orders_sdk') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('book_price_levels_sdk') + PsiElement())(')') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('expected_failure') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('abort_code') PsiWhiteSpace(' ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('book_price_levels_sdk') - PsiElement())(')') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('expected_failure') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('abort_code') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('liquidswap') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('liquidity_pool') + PsiElement(IDENTIFIER)('liquidswap') PsiElement(::)('::') - PsiElement(IDENTIFIER)('ERR_ADMIN') - PsiElement(,)(',') + PsiElement(IDENTIFIER)('liquidity_pool') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('ERR_ADMIN') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('location') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('liquidity_pool') + PsiElement())(')') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('abort_test') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('allow') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('lint') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('self_transfer') + PsiElement())(')') + PsiElement())(')') + PsiElement(])(']') + PsiWhiteSpace('\n ') + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('expected_failure') + MvAttrItemListImpl(ATTR_ITEM_LIST) + PsiElement(()('(') + PsiWhiteSpace('\n ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('abort_code') PsiWhiteSpace(' ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('location') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - MvRefExprImpl(REF_EXPR) + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') PsiElement(IDENTIFIER)('liquidity_pool') - PsiElement())(')') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('abort_test') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('allow') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('lint') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('self_transfer') - PsiElement())(')') - PsiElement())(')') - PsiElement(])(']') - PsiWhiteSpace('\n ') - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('expected_failure') - MvAttrItemListImpl(ATTR_ITEM_LIST) - PsiElement(()('(') - PsiWhiteSpace('\n ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('abort_code') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('ERR_ADMIN') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('location') + PsiWhiteSpace(' ') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('liquidity_pool') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('ERR_ADMIN') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('location') + PsiElement(IDENTIFIER)('aptos_framework') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('ed25519') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('location') + PsiWhiteSpace(' ') + MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) PsiElement(IDENTIFIER)('aptos_framework') PsiElement(::)('::') PsiElement(IDENTIFIER)('ed25519') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('location') - PsiWhiteSpace(' ') - MvAttrItemInitializerImpl(ATTR_ITEM_INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('aptos_framework') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('ed25519') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('myfunction') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement())(')') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('abort_test_2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(::)('::') + PsiElement(IDENTIFIER)('myfunction') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement())(')') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('abort_test_2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/comments.txt b/src/test/resources/org/move/lang/parser/complete/comments.txt index 2820cd79c..16b801f3f 100644 --- a/src/test/resources/org/move/lang/parser/complete/comments.txt +++ b/src/test/resources/org/move/lang/parser/complete/comments.txt @@ -4,32 +4,31 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n') - PsiComment(BLOCK_COMMENT)('/* block comment */') - PsiWhiteSpace('\n') - PsiComment(BLOCK_COMMENT)('/**\nmultiline comment\n*/') - PsiWhiteSpace('\n ') - PsiComment(BLOCK_COMMENT)('/**\n * One can have /* nested */\n * // block comments\n */') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiComment(EOL_COMMENT)('// /* unclosed block comment inside line comment') - PsiWhiteSpace('\n') - PsiComment(EOL_COMMENT)('// /* block comment inside line comment */') - PsiWhiteSpace('\n') - PsiElement(})('}') + PsiElement({)('{') + PsiWhiteSpace('\n') + PsiComment(BLOCK_COMMENT)('/* block comment */') + PsiWhiteSpace('\n') + PsiComment(BLOCK_COMMENT)('/**\nmultiline comment\n*/') + PsiWhiteSpace('\n ') + PsiComment(BLOCK_COMMENT)('/**\n * One can have /* nested */\n * // block comments\n */') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiComment(EOL_COMMENT)('// /* unclosed block comment inside line comment') + PsiWhiteSpace('\n') + PsiComment(EOL_COMMENT)('// /* block comment inside line comment */') + PsiWhiteSpace('\n') + PsiElement(})('}') PsiWhiteSpace('\n\n') MvModuleImpl(MODULE) PsiComment(EOL_DOC_COMMENT)('/// doc comment') @@ -43,80 +42,79 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiComment(EOL_DOC_COMMENT)('/// function doc comment') PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiComment(EOL_DOC_COMMENT)('/// function doc comment') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('m') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('m') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiComment(EOL_DOC_COMMENT)('/// doc comment with outer attribute') PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiComment(EOL_DOC_COMMENT)('/// doc comment with outer attribute') - PsiWhiteSpace('\n ') - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - PsiComment(BLOCK_COMMENT)('/*caret*/') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiComment(EOL_DOC_COMMENT)('/// docs') + PsiComment(BLOCK_COMMENT)('/*caret*/') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') PsiWhiteSpace('\n ') - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_m') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiComment(EOL_DOC_COMMENT)('/// docs') - PsiWhiteSpace('\n ') - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('NatS') - PsiElement(;)(';') - PsiWhiteSpace('\n') - PsiElement(})('}') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiComment(EOL_DOC_COMMENT)('/// docs') + PsiWhiteSpace('\n ') + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_m') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiComment(EOL_DOC_COMMENT)('/// docs') + PsiWhiteSpace('\n ') + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('NatS') + PsiElement(;)(';') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/contextual_token_operators.txt b/src/test/resources/org/move/lang/parser/complete/contextual_token_operators.txt index e4a410822..d23387687 100644 --- a/src/test/resources/org/move/lang/parser/complete/contextual_token_operators.txt +++ b/src/test/resources/org/move/lang/parser/complete/contextual_token_operators.txt @@ -2,116 +2,115 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[<]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[>]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[<<]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<<)('<<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[>>]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>>)('>>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[||]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(||)('||') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[<=]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<=)('<=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[>=]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>=)('>=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[<]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[>]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[<<]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<<)('<<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[>>]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>>)('>>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[||]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(||)('||') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[<=]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<=)('<=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[>=]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>=)('>=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/dot_expressions.txt b/src/test/resources/org/move/lang/parser/complete/dot_expressions.txt index 3cbbda6d5..fc0783149 100644 --- a/src/test/resources/org/move/lang/parser/complete/dot_expressions.txt +++ b/src/test/resources/org/move/lang/parser/complete/dot_expressions.txt @@ -7,186 +7,185 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('dot_expressions') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('dot') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field1') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[<]) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('dot') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('bin') PsiElement(.)('.') - MvMethodCallImpl(METHOD_CALL) - PsiElement(IDENTIFIER)('receiver_func') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiElement(.)('.') - MvMethodCallImpl(METHOD_CALL) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field1') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[<]) MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('bin') PsiElement(.)('.') - MvMethodCallImpl(METHOD_CALL) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(::)('::') - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + MvMethodCallImpl(METHOD_CALL) + PsiElement(IDENTIFIER)('receiver_func') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('bin') PsiElement(.)('.') - MvMethodCallImpl(METHOD_CALL) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(::)('::') - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('U') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvMethodCallImpl(METHOD_CALL) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + MvMethodCallImpl(METHOD_CALL) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(::)('::') + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + MvMethodCallImpl(METHOD_CALL) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(::)('::') + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('U') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiElement(.)('.') + MvMethodCallImpl(METHOD_CALL) + PsiElement(IDENTIFIER)('length') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(::)('::') PsiElement(<)('<') MvTypeArgumentImpl(TYPE_ARGUMENT) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') PsiElement(>)('>') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('dot') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvIndexExprImpl(INDEX_EXPR) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') PsiElement(.)('.') - MvMethodCallImpl(METHOD_CALL) - PsiElement(IDENTIFIER)('length') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(::)('::') - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('dot') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvIndexExprImpl(INDEX_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/enums.txt b/src/test/resources/org/move/lang/parser/complete/enums.txt index 77ba7f836..47e893c16 100644 --- a/src/test/resources/org/move/lang/parser/complete/enums.txt +++ b/src/test/resources/org/move/lang/parser/complete/enums.txt @@ -7,283 +7,282 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('enums') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvEnumImpl(ENUM) - PsiElement(enum_kw)('enum') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvEnumImpl(ENUM) + PsiElement(enum_kw)('enum') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('Color') + PsiWhiteSpace(' ') + MvAbilitiesListImpl(ABILITIES_LIST) + PsiElement(has_kw)('has') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Color') + MvAbilityImpl(ABILITY) + PsiElement(copy)('copy') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvAbilitiesListImpl(ABILITIES_LIST) - PsiElement(has_kw)('has') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(copy)('copy') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') - PsiWhiteSpace(' ') - MvEnumBodyImpl(ENUM_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('RGB') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('red') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('green') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('blue') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Red') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Blue') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvEnumImpl(ENUM) - PsiElement(enum_kw)('enum') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ColorUsesBlockNoComma') - PsiWhiteSpace(' ') - MvEnumBodyImpl(ENUM_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('RGB') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('red') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('green') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('blue') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Red') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Blue') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvEnumImpl(ENUM) - PsiElement(enum_kw)('enum') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('CommonFields') - PsiWhiteSpace(' ') - MvEnumBodyImpl(ENUM_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Foo') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('x') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('y') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Bar') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('x') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('z') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u32') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvEnumImpl(ENUM) - PsiElement(enum_kw)('enum') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Outer') - PsiWhiteSpace(' ') - MvEnumBodyImpl(ENUM_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('None') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('One') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('i') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Inner') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvEnumVariantImpl(ENUM_VARIANT) - PsiElement(IDENTIFIER)('Two') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('i') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Inner') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Box') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('one') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiWhiteSpace(' ') + MvEnumBodyImpl(ENUM_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('RGB') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('red') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('green') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('blue') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(})('}') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Red') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Blue') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvEnumImpl(ENUM) + PsiElement(enum_kw)('enum') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ColorUsesBlockNoComma') + PsiWhiteSpace(' ') + MvEnumBodyImpl(ENUM_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('RGB') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('red') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('green') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('blue') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Red') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Blue') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvEnumImpl(ENUM) + PsiElement(enum_kw)('enum') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('CommonFields') + PsiWhiteSpace(' ') + MvEnumBodyImpl(ENUM_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Foo') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('x') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('y') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(})('}') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Bar') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('x') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('z') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u32') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvEnumImpl(ENUM) + PsiElement(enum_kw)('enum') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('Outer') + PsiWhiteSpace(' ') + MvEnumBodyImpl(ENUM_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('None') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('One') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('i') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Inner') + PsiElement(})('}') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvEnumVariantImpl(ENUM_VARIANT) + PsiElement(IDENTIFIER)('Two') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('i') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Inner') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Box') + PsiElement(})('}') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('one') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') - PsiElement(IDENTIFIER)('S') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('One') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('two') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + PsiElement(IDENTIFIER)('S') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('One') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('two') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('S') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Two') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(IDENTIFIER)('S') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Two') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/expressions.txt b/src/test/resources/org/move/lang/parser/complete/expressions.txt index e1e3ed8ff..48486eb61 100644 --- a/src/test/resources/org/move/lang/parser/complete/expressions.txt +++ b/src/test/resources/org/move/lang/parser/complete/expressions.txt @@ -4,388 +4,387 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u8') + PsiElement(;)(';') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u8') - PsiElement(;)(';') - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u16') - PsiElement(;)(';') - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u32') - PsiElement(;)(';') - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u64') - PsiElement(;)(';') - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u128') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0b11') - PsiElement(;)(';') - PsiWhiteSpace(' ') - PsiComment(EOL_COMMENT)('// invalid') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0xFF') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0011') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0xRR') - PsiElement(;)(';') - PsiWhiteSpace(' ') - PsiComment(EOL_COMMENT)('// invalid') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0xFFFu128') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x1111_1111') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1_000') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[*]) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(*)('*') - PsiWhiteSpace(' ') - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[*]) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(*)('*') - PsiWhiteSpace(' ') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[%]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(%)('%') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[^]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(^)('^') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u16') + PsiElement(;)(';') + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u32') + PsiElement(;)(';') + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u64') + PsiElement(;)(';') + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u128') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0b11') + PsiElement(;)(';') + PsiWhiteSpace(' ') + PsiComment(EOL_COMMENT)('// invalid') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0xFF') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0011') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0xRR') + PsiElement(;)(';') + PsiWhiteSpace(' ') + PsiComment(EOL_COMMENT)('// invalid') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0xFFFu128') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x1111_1111') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1_000') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[*]) MvParensExprImpl(PARENS_EXPR) PsiElement(()('(') - MvCastExprImpl(CAST_EXPR) - MvBinaryExprImpl(BINARY_EXPR[*]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(*)('*') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(as)('as') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(*)('*') + PsiWhiteSpace(' ') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[*]) - MvBinaryExprImpl(BINARY_EXPR[*]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(*)('*') - PsiWhiteSpace(' ') - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('3') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('5') - PsiElement())(')') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(*)('*') - PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[*]) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('4') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[<]) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(*)('*') + PsiWhiteSpace(' ') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[%]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(%)('%') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[^]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(^)('^') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvCastExprImpl(CAST_EXPR) + MvBinaryExprImpl(BINARY_EXPR[*]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') + PsiElement(*)('*') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(as)('as') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvIndexExprImpl(INDEX_EXPR) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v1') - PsiElement([)('[') + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[+]) MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v2') - PsiElement([)('[') - MvRangeExprImpl(RANGE_EXPR) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('i') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[*]) + MvBinaryExprImpl(BINARY_EXPR[*]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(*)('*') + PsiWhiteSpace(' ') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('3') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('5') + PsiElement())(')') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') + PsiElement(*)('*') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(..)('..') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('len') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v2') - PsiElement())(')') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('has') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('schema') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('include') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('assume') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement(INTEGER_LITERAL)('4') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvIndexExprImpl(INDEX_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('assert') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement(IDENTIFIER)('v1') + PsiElement([)('[') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvIndexExprImpl(INDEX_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('invariant') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvReturnExprImpl(RETURN_EXPR) - PsiElement(return)('return') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('m') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvReturnExprImpl(RETURN_EXPR) - PsiElement(return)('return') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(IDENTIFIER)('v2') + PsiElement([)('[') + MvRangeExprImpl(RANGE_EXPR) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('i') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(..)('..') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('len') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v2') + PsiElement())(')') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('has') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('schema') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('include') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('assume') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('assert') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('invariant') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvReturnExprImpl(RETURN_EXPR) + PsiElement(return)('return') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('m') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvReturnExprImpl(RETURN_EXPR) + PsiElement(return)('return') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/expressions_angle_brackets.txt b/src/test/resources/org/move/lang/parser/complete/expressions_angle_brackets.txt index 90615fbfb..b00f5a459 100644 --- a/src/test/resources/org/move/lang/parser/complete/expressions_angle_brackets.txt +++ b/src/test/resources/org/move/lang/parser/complete/expressions_angle_brackets.txt @@ -2,113 +2,112 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(<)('<') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[<=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<=)('<=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(>)('>') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[<=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<=)('<=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') + PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[>]) - MvBinaryExprImpl(BINARY_EXPR[>=]) - MvBinaryExprImpl(BINARY_EXPR[<]) - MvBinaryExprImpl(BINARY_EXPR[<=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<=)('<=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[>=]) + MvBinaryExprImpl(BINARY_EXPR[<]) + MvBinaryExprImpl(BINARY_EXPR[<=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') + PsiElement(<=)('<=') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>=)('>=') + PsiElement(<)('<') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + PsiElement(>=)('>=') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('3') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(INTEGER_LITERAL)('2') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('3') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/expressions_assignments.txt b/src/test/resources/org/move/lang/parser/complete/expressions_assignments.txt index 8bb08cd1a..2c3d777fc 100644 --- a/src/test/resources/org/move/lang/parser/complete/expressions_assignments.txt +++ b/src/test/resources/org/move/lang/parser/complete/expressions_assignments.txt @@ -2,182 +2,181 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvInitializerImpl(INITIALIZER) PsiElement(=)('=') PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvInitializerImpl(INITIALIZER) PsiElement(=)('=') PsiWhiteSpace(' ') - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBinaryExprImpl(BINARY_EXPR[*]) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBinaryOpImpl(BINARY_OP) + PsiElement(*)('*') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[*]) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(*)('*') - PsiWhiteSpace(' ') - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/expressions_if_else_as.txt b/src/test/resources/org/move/lang/parser/complete/expressions_if_else_as.txt index 68cc550dc..d2a31d7e5 100644 --- a/src/test/resources/org/move/lang/parser/complete/expressions_if_else_as.txt +++ b/src/test/resources/org/move/lang/parser/complete/expressions_if_else_as.txt @@ -2,29 +2,39 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvIfExprImpl(IF_EXPR) - PsiElement(if)('if') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvIfExprImpl(IF_EXPR) + PsiElement(if)('if') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInlineBlockImpl(INLINE_BLOCK) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvElseBlockImpl(ELSE_BLOCK) + PsiElement(else)('else') PsiWhiteSpace(' ') MvInlineBlockImpl(INLINE_BLOCK) MvDerefExprImpl(DEREF_EXPR) @@ -32,90 +42,79 @@ FILE MvBangExprImpl(BANG_EXPR) PsiElement(!)('!') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvElseBlockImpl(ELSE_BLOCK) - PsiElement(else)('else') + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCastExprImpl(CAST_EXPR) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvIfExprImpl(IF_EXPR) + PsiElement(if)('if') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') PsiWhiteSpace(' ') MvInlineBlockImpl(INLINE_BLOCK) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCastExprImpl(CAST_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvIfExprImpl(IF_EXPR) - PsiElement(if)('if') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvElseBlockImpl(ELSE_BLOCK) + PsiElement(else)('else') PsiWhiteSpace(' ') MvInlineBlockImpl(INLINE_BLOCK) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvElseBlockImpl(ELSE_BLOCK) - PsiElement(else)('else') - PsiWhiteSpace(' ') - MvInlineBlockImpl(INLINE_BLOCK) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(as)('as') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCastExprImpl(CAST_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(as)('as') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCastExprImpl(CAST_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('2') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(as)('as') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(as)('as') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCastExprImpl(CAST_EXPR) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(as)('as') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCastExprImpl(CAST_EXPR) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(as)('as') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/expressions_specs.txt b/src/test/resources/org/move/lang/parser/complete/expressions_specs.txt index b57506c3e..62ad16abf 100644 --- a/src/test/resources/org/move/lang/parser/complete/expressions_specs.txt +++ b/src/test/resources/org/move/lang/parser/complete/expressions_specs.txt @@ -4,105 +4,104 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[==>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[<==>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<==>)('<==>') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('b') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[==>]) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[==>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[<==>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<==>)('<==>') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('b') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[==>]) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(<)('<') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(&&)('&&') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[<==>]) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[<=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<=)('<=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[<==>]) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[<=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(<=)('<=') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(<==>)('<==>') + PsiElement(&&)('&&') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<==>)('<==>') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/friend.txt b/src/test/resources/org/move/lang/parser/complete/friend.txt index 1645d1f47..5bd4acefe 100644 --- a/src/test/resources/org/move/lang/parser/complete/friend.txt +++ b/src/test/resources/org/move/lang/parser/complete/friend.txt @@ -4,75 +4,74 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M1') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFriendDeclImpl(FRIEND_DECL) + PsiElement(friend_kw)('friend') + PsiWhiteSpace(' ') + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('M2') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFriendDeclImpl(FRIEND_DECL) + MvAttrImpl(ATTR) + PsiElement(#)('#') + PsiElement([)('[') + MvAttrItemImpl(ATTR_ITEM) + PsiElement(IDENTIFIER)('test_only') + PsiElement(])(']') PsiWhiteSpace('\n ') - MvFriendDeclImpl(FRIEND_DECL) - PsiElement(friend_kw)('friend') - PsiWhiteSpace(' ') + PsiElement(friend_kw)('friend') + PsiWhiteSpace(' ') + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('M2') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFriendDeclImpl(FRIEND_DECL) - MvAttrImpl(ATTR) - PsiElement(#)('#') - PsiElement([)('[') - MvAttrItemImpl(ATTR_ITEM) - PsiElement(IDENTIFIER)('test_only') - PsiElement(])(']') - PsiWhiteSpace('\n ') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x2') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('M2') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') PsiElement(friend_kw)('friend') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f_of_m1') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') PsiWhiteSpace(' ') - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x2') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('M2') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(friend_kw)('friend') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') + PsiElement(()('(') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f_of_m1') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(()('(') - PsiWhiteSpace(' ') - PsiElement(friend_kw)('friend') - PsiWhiteSpace(' ') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f_of_m2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + PsiElement(friend_kw)('friend') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('f_of_m2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/function_calls.txt b/src/test/resources/org/move/lang/parser/complete/function_calls.txt index f34cb93e7..2ecfc7573 100644 --- a/src/test/resources/org/move/lang/parser/complete/function_calls.txt +++ b/src/test/resources/org/move/lang/parser/complete/function_calls.txt @@ -2,456 +2,455 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b""') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b""') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b""') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x""') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x""') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b""') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x""') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x""') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(,)(',') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1u64') - PsiElement(,)(',') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b""') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b""') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b""') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x""') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x""') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b""') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x""') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x""') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(,)(',') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0u8') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0u64') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u8') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1u64') + PsiElement(,)(',') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('a') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('b') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvCopyExprImpl(COPY_EXPR) + PsiElement(copy)('copy') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvMoveExprImpl(MOVE_EXPR) + PsiElement(move)('move') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('b') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Mod') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('S') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Sender') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Mod') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('S') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvCopyExprImpl(COPY_EXPR) - PsiElement(copy)('copy') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvMoveExprImpl(MOVE_EXPR) - PsiElement(move)('move') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Mod') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('S') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Sender') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Mod') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('S') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvCallExprImpl(CALL_EXPR) + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('new') + PsiElement(IDENTIFIER)('vector') MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') MvTypeArgumentImpl(TYPE_ARGUMENT) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Sender') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('u8') PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('new') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Sender') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('assert') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('assert') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/function_declarations.txt b/src/test/resources/org/move/lang/parser/complete/function_declarations.txt index 5b00034ca..3263848bf 100644 --- a/src/test/resources/org/move/lang/parser/complete/function_declarations.txt +++ b/src/test/resources/org/move/lang/parser/complete/function_declarations.txt @@ -4,679 +4,678 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('void_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvUnitTypeImpl(UNIT_TYPE) PsiElement(()('(') PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('void_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(entry_kw)('entry') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('void_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvUnitTypeImpl(UNIT_TYPE) PsiElement(()('(') PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvUnitTypeImpl(UNIT_TYPE) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(entry_kw)('entry') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('void_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('tuple_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvTupleTypeImpl(TUPLE_TYPE) PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvUnitTypeImpl(UNIT_TYPE) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('tuple_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvTupleTypeImpl(TUPLE_TYPE) - PsiElement(()('(') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(,)(',') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + PsiElement(mut)('mut') PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(entry_kw)('entry') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(script_kw)('script') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(friend_kw)('friend') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(entry_kw)('entry') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(script_kw)('script') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(friend_kw)('friend') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(friend_kw)('friend') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(entry_kw)('entry') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn_with_returned_tuple') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvTupleTypeImpl(TUPLE_TYPE) PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(friend_kw)('friend') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(entry_kw)('entry') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + PsiElement(,)(',') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn_with_returned_tuple') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvTupleTypeImpl(TUPLE_TYPE) - PsiElement(()('(') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn_with_type_params') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn_with_type_params') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('store') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('store') + PsiWhiteSpace(' ') + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) PsiElement(IDENTIFIER)('T') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('store') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('U') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('store') - PsiWhiteSpace(' ') - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn_with_signer') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('s') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('signer') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn_with_borrowed_qual_type') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('s') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Sender') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn_with_arguments') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn_with_signer') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('s') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('c') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('signer') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn_with_borrowed_qual_type') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('s') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) MvPathImpl(PATH) PsiElement(IDENTIFIER)('Transaction') PsiElement(::)('::') PsiElement(IDENTIFIER)('Sender') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Sender') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fn_with_acquires') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace('\n ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn_with_arguments') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Sender') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Sender') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('c') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Std') + PsiElement(IDENTIFIER)('Transaction') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Sender') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + PsiElement(IDENTIFIER)('Sender') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Loans') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Loan') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(native)('native') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Sender') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fn_with_acquires') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace('\n ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(fun)('fun') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(script_kw)('script') - PsiElement())(')') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Sender') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(friend_kw)('friend') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Sender') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_fn') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('native_fn_with_acquires') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Std') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Sender') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(;)(';') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(IDENTIFIER)('Loans') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Loan') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(script_kw)('script') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(friend_kw)('friend') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_fn') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('native_fn_with_acquires') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(;)(';') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/generics.txt b/src/test/resources/org/move/lang/parser/complete/generics.txt index 85b739648..e0ab16e05 100644 --- a/src/test/resources/org/move/lang/parser/complete/generics.txt +++ b/src/test/resources/org/move/lang/parser/complete/generics.txt @@ -2,195 +2,194 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') - PsiElement(,)(',') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('U') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('map') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('map') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('map') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('c') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[>=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('c') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>=)('>=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('map') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[>=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>=)('>=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/index_expr.txt b/src/test/resources/org/move/lang/parser/complete/index_expr.txt index e4821c4e6..2910a7419 100644 --- a/src/test/resources/org/move/lang/parser/complete/index_expr.txt +++ b/src/test/resources/org/move/lang/parser/complete/index_expr.txt @@ -7,551 +7,604 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('index_expr') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('X') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('M') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvAbilitiesListImpl(ABILITIES_LIST) + PsiElement(has_kw)('has') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('X') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('M') - PsiElement(>)('>') + MvAbilityImpl(ABILITY) + PsiElement(copy)('copy') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvAbilitiesListImpl(ABILITIES_LIST) - PsiElement(has_kw)('has') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(copy)('copy') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('store') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('value') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('M') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('store') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('value') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('M') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('Y') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvAbilitiesListImpl(ABILITIES_LIST) + PsiElement(has_kw)('has') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Y') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('key') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvAbilitiesListImpl(ABILITIES_LIST) - PsiElement(has_kw)('has') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('field') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test_vector') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('key') - PsiElement(,)(',') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('v') PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') - PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('field') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test_vector') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('v') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(])(']') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiElement(,)(',') PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(])(']') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test_vector_borrow_mut') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + PsiElement(INTEGER_LITERAL)('2') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y2') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test_vector_borrow_mut') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y2') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(])(']') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(])(']') + PsiElement())(')') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiElement())(')') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(])(']') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(])(']') + PsiElement())(')') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiElement())(')') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test_resource_3') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test_resource_3') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvUseSpeckImpl(USE_SPECK) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x42') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('test') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x42') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('test') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('test') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Y') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiElement(>)('>') - PsiElement(>)('>') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(])(']') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + PsiElement(IDENTIFIER)('test') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Y') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiElement(>)('>') + PsiElement(>)('>') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(])(']') + PsiElement())(')') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test_resource_4') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test_resource_4') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x42') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('test') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Y') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiElement(>)('>') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('addr') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') MvInitializerImpl(INITIALIZER) PsiElement(=)('=') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') + PsiElement(BOOL_LITERAL)('false') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) + PsiElement(spec)('spec') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x42') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('test') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Y') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAssertSpecExprImpl(ASSERT_SPEC_EXPR) + PsiElement(assert_kw)('assert') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') + PsiElement(IDENTIFIER)('Y') MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') MvTypeArgumentImpl(TYPE_ARGUMENT) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') + PsiElement(IDENTIFIER)('X') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiElement(>)('>') PsiElement(>)('>') - PsiElement(>)('>') - PsiWhiteSpace(' ') - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('addr') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAssertSpecExprImpl(ASSERT_SPEC_EXPR) - PsiElement(assert_kw)('assert') + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('addr') + PsiElement(])(']') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') MvIndexExprImpl(INDEX_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) @@ -575,196 +628,86 @@ FILE MvPathImpl(PATH) PsiElement(IDENTIFIER)('addr') PsiElement(])(']') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Y') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiElement(>)('>') - PsiElement(>)('>') - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('addr') - PsiElement(])(']') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + PsiElement())(')') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('test_resource_5') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Y') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x42') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('test') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Y') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiElement(>)('>') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('addr') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('test_resource_5') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Y') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y_resource') + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') PsiWhiteSpace(' ') MvIndexExprImpl(INDEX_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x42') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('test') + PsiElement(::)('::') PsiElement(IDENTIFIER)('Y') MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') @@ -780,46 +723,102 @@ FILE PsiElement(IDENTIFIER)('bool') PsiElement(>)('>') PsiElement(>)('>') + PsiWhiteSpace(' ') PsiElement([)('[') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('addr') PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y_resource') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Y') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiElement(>)('>') + PsiElement(>)('>') + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('addr') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) MvDotExprImpl(DOT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y_resource') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y_resource') PsiElement(.)('.') MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiElement(IDENTIFIER)('field') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/let_patterns.txt b/src/test/resources/org/move/lang/parser/complete/let_patterns.txt index 1b110ee7f..2e53ff3ec 100644 --- a/src/test/resources/org/move/lang/parser/complete/let_patterns.txt +++ b/src/test/resources/org/move/lang/parser/complete/let_patterns.txt @@ -2,525 +2,511 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvTuplePatImpl(TUPLE_PAT) + PsiElement(()('(') MvBindingPatImpl(BINDING_PAT) PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvTupleLitExprImpl(TUPLE_LIT_EXPR) + PsiElement(()('(') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvTuplePatImpl(TUPLE_PAT) - PsiElement(()('(') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) MvBindingPatImpl(BINDING_PAT) PsiElement(IDENTIFIER)('a') - PsiElement(,)(',') - PsiWhiteSpace(' ') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) MvBindingPatImpl(BINDING_PAT) PsiElement(IDENTIFIER)('b') - PsiElement())(')') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvTupleLitExprImpl(TUPLE_LIT_EXPR) + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('get_record') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiElement(,)(',') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('a') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('b') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('get_record') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) + MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('a') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('b') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(})('}') + PsiElement(IDENTIFIER)('get_record') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('get_record') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('a') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('alias_a') - PsiElement(,)(',') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('a') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('b') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('alias_b') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('alias_a') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('b') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('alias_b') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('get_record') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) + MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('a') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('c') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('d') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('get_record') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(IDENTIFIER)('get_record') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('a') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('c') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('alias_c') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('d') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('get_record') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') PsiWhiteSpace(' ') - MvTuplePatImpl(TUPLE_PAT) - PsiElement(()('(') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('a') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') PsiElement({)('{') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) + MvFieldPatImpl(FIELD_PAT) MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') + PsiElement(IDENTIFIER)('c') PsiElement(,)(',') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) + MvFieldPatImpl(FIELD_PAT) MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') + PsiElement(IDENTIFIER)('d') PsiWhiteSpace(' ') PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('M') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('get_record') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('a') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') PsiElement({)('{') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('a') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('c') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) PsiElement(:)(':') PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('alias_c') PsiElement(,)(',') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('b') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('d') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) PsiElement(:)(':') PsiWhiteSpace(' ') MvWildPatImpl(WILD_PAT) PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') PsiElement(})('}') - PsiElement())(')') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('get_record_tuple') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('get_record') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvTuplePatImpl(TUPLE_PAT) + PsiElement(()('(') MvStructPatImpl(STRUCT_PAT) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Generic') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + PsiElement({)('{') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('g') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Generic') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiElement(>)('>') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('g') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('g') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(})('}') + PsiElement(,)(',') PsiWhiteSpace(' ') MvStructPatImpl(STRUCT_PAT) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Generic') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('g') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('f') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('f3') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + PsiElement({)('{') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('g') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('a') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('b') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(})('}') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvParensTypeImpl(PARENS_TYPE) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('get_record_tuple') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiElement())(')') PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Generic') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiElement(>)('>') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') - MvTupleTypeImpl(TUPLE_TYPE) - PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('g') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Generic') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') + PsiElement(IDENTIFIER)('R') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('g') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('g') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Generic') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('g') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('f') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('f3') PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('g') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') PsiElement())(')') PsiElement())(')') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvTupleLitExprImpl(TUPLE_LIT_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') + MvTupleTypeImpl(TUPLE_TYPE) PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvTupleLitExprImpl(TUPLE_LIT_EXPR) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/loops.txt b/src/test/resources/org/move/lang/parser/complete/loops.txt index 4e831db6e..d5bc3805b 100644 --- a/src/test/resources/org/move/lang/parser/complete/loops.txt +++ b/src/test/resources/org/move/lang/parser/complete/loops.txt @@ -7,123 +7,122 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('loops') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBreakExprImpl(BREAK_EXPR) - PsiElement(break)('break') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvContinueExprImpl(CONTINUE_EXPR) - PsiElement(continue)('continue') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLoopExprImpl(LOOP_EXPR) - PsiElement(loop)('loop') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBreakExprImpl(BREAK_EXPR) - PsiElement(break)('break') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvContinueExprImpl(CONTINUE_EXPR) - PsiElement(continue)('continue') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBreakExprImpl(BREAK_EXPR) + PsiElement(break)('break') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvContinueExprImpl(CONTINUE_EXPR) + PsiElement(continue)('continue') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLoopExprImpl(LOOP_EXPR) + PsiElement(loop)('loop') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('for') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvForExprImpl(FOR_EXPR) - PsiElement(for_kw)('for') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBreakExprImpl(BREAK_EXPR) + PsiElement(break)('break') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvContinueExprImpl(CONTINUE_EXPR) + PsiElement(continue)('continue') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('for') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvForExprImpl(FOR_EXPR) + PsiElement(for_kw)('for') + PsiWhiteSpace(' ') + MvForIterConditionImpl(FOR_ITER_CONDITION) + PsiElement(()('(') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('i') PsiWhiteSpace(' ') - MvForIterConditionImpl(FOR_ITER_CONDITION) - PsiElement(()('(') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('i') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') - PsiElement())(')') + PsiElement(in_kw)('in') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBreakExprImpl(BREAK_EXPR) - PsiElement(break)('break') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvContinueExprImpl(CONTINUE_EXPR) - PsiElement(continue)('continue') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBreakExprImpl(BREAK_EXPR) + PsiElement(break)('break') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvContinueExprImpl(CONTINUE_EXPR) + PsiElement(continue)('continue') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/macros.txt b/src/test/resources/org/move/lang/parser/complete/macros.txt index c639cd9f0..22cf548e4 100644 --- a/src/test/resources/org/move/lang/parser/complete/macros.txt +++ b/src/test/resources/org/move/lang/parser/complete/macros.txt @@ -7,359 +7,358 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('macros') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(inline_kw)('inline') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('map') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Element') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(inline_kw)('inline') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('map') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Element') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('NewElement') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiWhiteSpace('\n ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('v') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Element') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('f') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvLambdaTypeImpl(LAMBDA_TYPE) - PsiElement(|)('|') - MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Element') - PsiElement(|)('|') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('NewElement') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('NewElement') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('NewElement') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiWhiteSpace('\n ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('v') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foreach') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLambdaExprImpl(LAMBDA_EXPR) - PsiElement(|)('|') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('elem') - PsiElement(|)('|') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('push_back') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('f') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('elem') - PsiElement())(')') - PsiElement())(')') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(inline_kw)('inline') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('filter') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Element') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiWhiteSpace('\n ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('p') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvLambdaTypeImpl(LAMBDA_TYPE) - PsiElement(|)('|') - MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('Element') - PsiElement(|)('|') - PsiWhiteSpace('\n ') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foreach') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLambdaExprImpl(LAMBDA_EXPR) - PsiElement(|)('|') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('elem') - PsiElement(|)('|') - PsiWhiteSpace(' ') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvIfExprImpl(IF_EXPR) - PsiElement(if)('if') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('p') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('elem') - PsiElement())(')') - PsiElement())(')') - PsiWhiteSpace(' ') - MvInlineBlockImpl(INLINE_BLOCK) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('push_back') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('elem') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(inline_kw)('inline') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('fold') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Element') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') + PsiElement(>)('>') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('f') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvLambdaTypeImpl(LAMBDA_TYPE) + PsiElement(|)('|') + MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('Element') - PsiElement())(')') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('f') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(|)('|') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('NewElement') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('NewElement') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foreach') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') - MvLambdaTypeImpl(LAMBDA_TYPE) + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLambdaExprImpl(LAMBDA_EXPR) PsiElement(|)('|') - MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Element') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('elem') PsiElement(|)('|') PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('push_back') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('result') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('f') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('elem') + PsiElement())(')') + PsiElement())(')') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(inline_kw)('inline') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('filter') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Element') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiWhiteSpace('\n ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('p') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvLambdaTypeImpl(LAMBDA_TYPE) + PsiElement(|)('|') + MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('Element') - PsiElement())(')') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('g') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(|)('|') + PsiWhiteSpace('\n ') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foreach') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement(,)(',') PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLambdaExprImpl(LAMBDA_EXPR) + PsiElement(|)('|') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('elem') + PsiElement(|)('|') + PsiWhiteSpace(' ') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvIfExprImpl(IF_EXPR) + PsiElement(if)('if') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('p') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('elem') + PsiElement())(')') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInlineBlockImpl(INLINE_BLOCK) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('push_back') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('result') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('elem') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(inline_kw)('inline') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('fold') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Element') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Element') + PsiElement())(')') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('f') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') MvLambdaTypeImpl(LAMBDA_TYPE) PsiElement(|)('|') MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('Element') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') - MvLambdaTypeImpl(LAMBDA_TYPE) - PsiElement(|)('|') - MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Element') - PsiElement(|)('|') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Element') - PsiElement())(')') PsiElement(|)('|') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('Element') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Element') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('f') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) + PsiElement())(')') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('g') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvLambdaTypeImpl(LAMBDA_TYPE) + PsiElement(|)('|') + MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + PsiElement(IDENTIFIER)('Element') PsiElement(,)(',') PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('g') - PsiElement())(')') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) + MvParensTypeImpl(PARENS_TYPE) + PsiElement(()('(') + MvLambdaTypeImpl(LAMBDA_TYPE) + PsiElement(|)('|') + MvLambdaTypeParamImpl(LAMBDA_TYPE_PARAM) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Element') + PsiElement(|)('|') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Element') + PsiElement())(')') + PsiElement(|)('|') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Element') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Element') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('f') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('g') + PsiElement())(')') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/match.txt b/src/test/resources/org/move/lang/parser/complete/match.txt index 5c981a74c..9eb6f9f2d 100644 --- a/src/test/resources/org/move/lang/parser/complete/match.txt +++ b/src/test/resources/org/move/lang/parser/complete/match.txt @@ -7,1019 +7,1001 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('match') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiElement({)('{') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t1') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t1') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') + PsiElement(IDENTIFIER)('red') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('green') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t1_field_named') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('red') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('r') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('green') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('g') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('r') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') + PsiElement(IDENTIFIER)('g') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + PsiElement(+)('+') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t1_field_named') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t1_uses_block') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('red') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('r') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('green') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('g') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvBinaryExprImpl(BINARY_EXPR[+]) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('r') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('green') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('g') + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') + PsiElement(>)('>') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t1_uses_block') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(})('}') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t1_uses_block_no_comma') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') + PsiElement(IDENTIFIER)('green') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + PsiElement(+)('+') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t1_uses_block_no_comma') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t1_module_qualified') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) + PsiElement(IDENTIFIER)('m') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) - MvPathImpl(PATH) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') + PsiElement(IDENTIFIER)('green') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t1_module_qualified') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('m') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t1_address_qualified') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('m') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('m') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x815') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') + PsiElement(IDENTIFIER)('green') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + PsiElement(+)('+') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('m') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x815') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t1_address_qualified') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x815') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') + PsiElement(IDENTIFIER)('green') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + PsiElement(+)('+') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x815') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t3') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t3') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(+)('+') @@ -1028,435 +1010,78 @@ FILE PsiElement(*)('*') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t4') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) PsiElement(IDENTIFIER)('green') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('blue') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') PsiWhiteSpace(' ') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t5_freeze') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('r') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Red') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvEnumVariantPatImpl(ENUM_VARIANT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Blue') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('r') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t6_construct') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchExprImpl(MATCH_EXPR) - PsiElement(match_kw)('match') - PsiWhiteSpace(' ') - MvMatchArgumentImpl(MATCH_ARGUMENT) - PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiElement())(')') - PsiWhiteSpace(' ') - MvMatchBodyImpl(MATCH_BODY) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RGB') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('red') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('green') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[-]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(-)('-') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') + PsiElement(IDENTIFIER)('blue') PsiWhiteSpace(' ') - PsiElement(=>)('=>') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('t8_unqualified_variant') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('self') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Color') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t4') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) MvMatchExprImpl(MATCH_EXPR) PsiElement(match_kw)('match') PsiWhiteSpace(' ') MvMatchArgumentImpl(MATCH_ARGUMENT) PsiElement(()('(') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('self') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') PsiElement())(')') PsiWhiteSpace(' ') MvMatchBodyImpl(MATCH_BODY) @@ -1466,104 +1091,467 @@ FILE MvMatchPatImpl(MATCH_PAT) MvStructPatImpl(STRUCT_PAT) MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') PsiElement(IDENTIFIER)('RGB') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('red') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('green') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('blue') - PsiElement(})('}') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('green') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('blue') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiElement(})('}') PsiWhiteSpace(' ') PsiElement(=>)('=>') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[!=]) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('red') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(!=)('!=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[!=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('green') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(!=)('!=') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('blue') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvMatchArmImpl(MATCH_ARM) - MvMatchPatImpl(MATCH_PAT) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('Red') - PsiWhiteSpace(' ') - PsiElement(=>)('=>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') PsiElement(,)(',') PsiWhiteSpace('\n ') MvMatchArmImpl(MATCH_ARM) MvMatchPatImpl(MATCH_PAT) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('Blue') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') PsiElement(=>)('=>') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') PsiElement(,)(',') PsiWhiteSpace('\n ') PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('match_as_function') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t5_freeze') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('match') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('r') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Red') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvEnumVariantPatImpl(ENUM_VARIANT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('r') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t6_construct') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('RGB') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('red') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('green') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[-]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('green') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(-)('-') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('t8_unqualified_variant') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('self') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Color') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchExprImpl(MATCH_EXPR) + PsiElement(match_kw)('match') + PsiWhiteSpace(' ') + MvMatchArgumentImpl(MATCH_ARGUMENT) + PsiElement(()('(') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('self') + PsiElement())(')') + PsiWhiteSpace(' ') + MvMatchBodyImpl(MATCH_BODY) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RGB') + PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('red') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('green') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('blue') + PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[!=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('red') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(!=)('!=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('green') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[!=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('green') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(!=)('!=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('blue') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('Red') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvMatchArmImpl(MATCH_ARM) + MvMatchPatImpl(MATCH_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('Blue') + PsiWhiteSpace(' ') + PsiElement(=>)('=>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('false') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('match_as_function') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('match') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/paths.txt b/src/test/resources/org/move/lang/parser/complete/paths.txt index 937f6de0e..a6aba7bbf 100644 --- a/src/test/resources/org/move/lang/parser/complete/paths.txt +++ b/src/test/resources/org/move/lang/parser/complete/paths.txt @@ -7,46 +7,71 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('paths') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('m') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('std') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('m') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathAddressImpl(PATH_ADDRESS) PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') PsiElement(IDENTIFIER)('m') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('call') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) PsiElement(IDENTIFIER)('std') PsiElement(::)('::') PsiElement(IDENTIFIER)('m') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('call') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) @@ -55,11 +80,14 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('call') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('Enum') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('EnumType') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) @@ -67,63 +95,47 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('call') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Enum') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('EnumType') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Enum') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('EnumType') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('Enum') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('EnumType') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('std') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) PsiElement(IDENTIFIER)('std') MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('item') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - PsiElement(>)('>') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('item') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('std') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('m') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) PsiElement(IDENTIFIER)('std') @@ -132,25 +144,28 @@ FILE MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('item') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('std') PsiElement(::)('::') - PsiElement(IDENTIFIER)('item') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('m') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('call') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) @@ -162,28 +177,31 @@ FILE MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('item') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') + PsiElement(IDENTIFIER)('std') PsiElement(::)('::') - PsiElement(IDENTIFIER)('call') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('m') PsiElement(::)('::') - PsiElement(IDENTIFIER)('item') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('Enum') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('EnumType') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) @@ -198,29 +216,10 @@ FILE MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) PsiElement(<)('<') PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Enum') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('EnumType') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - PsiElement(>)('>') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('item') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(::)('::') + PsiElement(IDENTIFIER)('item') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/public_package.txt b/src/test/resources/org/move/lang/parser/complete/public_package.txt index fd7697c1a..91a3db5f4 100644 --- a/src/test/resources/org/move/lang/parser/complete/public_package.txt +++ b/src/test/resources/org/move/lang/parser/complete/public_package.txt @@ -7,66 +7,65 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('public_package') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(package_kw)('package') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') + PsiElement({)('{') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(package_kw)('package') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('package') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('package') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('package') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('package') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('package') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('package') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('package') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('package') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('package') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - PsiElement(})('}') \ No newline at end of file + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('package') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/strings.txt b/src/test/resources/org/move/lang/parser/complete/strings.txt index 4451e09f0..c458bd3ed 100644 --- a/src/test/resources/org/move/lang/parser/complete/strings.txt +++ b/src/test/resources/org/move/lang/parser/complete/strings.txt @@ -2,55 +2,54 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"(false: bool);"') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x"0101"') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x""') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"\t\n\r\0"') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"\\"') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"\""') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"\x01"') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"(false: bool);"') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x"0101"') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x""') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"\t\n\r\0"') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"\\"') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"\""') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"\x01"') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/struct_declarations.txt b/src/test/resources/org/move/lang/parser/complete/struct_declarations.txt index 08d95b3a8..ccdae9a44 100644 --- a/src/test/resources/org/move/lang/parser/complete/struct_declarations.txt +++ b/src/test/resources/org/move/lang/parser/complete/struct_declarations.txt @@ -7,190 +7,189 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Coin') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(phantom)('phantom') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('CoinType') - PsiElement(,)(',') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('Coin') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(phantom)('phantom') PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(phantom)('phantom') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('CoinType2') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('CoinType') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ValidatorConfig') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvAbilitiesListImpl(ABILITIES_LIST) - PsiElement(has_kw)('has') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('store') - PsiElement(,)(',') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(phantom)('phantom') PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') + PsiElement(IDENTIFIER)('CoinType2') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ValidatorConfig') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvAbilitiesListImpl(ABILITIES_LIST) + PsiElement(has_kw)('has') PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('val1') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('val2') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ResourceValidatorConfig') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(copy)('copy') - PsiElement(>)('>') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('store') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('val1') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('val2') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('operator_account') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Option') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('val1') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('val2') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ResourceValidatorConfig') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvAbilityImpl(ABILITY) + PsiElement(copy)('copy') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('val1') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('val2') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('operator_account') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Option') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiElement(>)('>') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('operator_account2') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Option') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('operator_account2') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Option') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('signer') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('NativeStruct') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiElement(native)('native') + PsiElement(IDENTIFIER)('signer') + PsiElement(>)('>') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('NativeStruct') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('NativeStructParams') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('K') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('NativeStructParams') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('K') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('V') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n') - PsiElement(})('}') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('V') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/struct_literals.txt b/src/test/resources/org/move/lang/parser/complete/struct_literals.txt index d3962f79e..c263eb150 100644 --- a/src/test/resources/org/move/lang/parser/complete/struct_literals.txt +++ b/src/test/resources/org/move/lang/parser/complete/struct_literals.txt @@ -4,168 +4,167 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Struct') PsiWhiteSpace(' ') - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Struct') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('a') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('a') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('val') - PsiElement(,)(',') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('val') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('b') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('b') - PsiElement(:)(':') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Struct') PsiWhiteSpace(' ') - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Struct') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('a') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('a') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('val') - PsiElement(,)(',') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('val') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('b') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('b') - PsiElement(:)(':') + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Struct2') PsiWhiteSpace(' ') - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Struct2') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('val') - PsiElement(,)(',') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('val') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('anotherval') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('anotherval') - PsiElement(:)(':') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('return_empty_struct') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvReturnExprImpl(RETURN_EXPR) - PsiElement(return)('return') - PsiWhiteSpace(' ') - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Struct') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + PsiElement(})('}') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('return_empty_struct_as_expression') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Struct') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('return_empty_struct') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvReturnExprImpl(RETURN_EXPR) + PsiElement(return)('return') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Struct') + PsiWhiteSpace(' ') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('return_empty_struct_as_expression') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Struct') + PsiWhiteSpace(' ') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/use.txt b/src/test/resources/org/move/lang/parser/complete/use.txt index 100df47b2..3af12a6cb 100644 --- a/src/test/resources/org/move/lang/parser/complete/use.txt +++ b/src/test/resources/org/move/lang/parser/complete/use.txt @@ -7,40 +7,80 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('m') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathAddressImpl(PATH_ADDRESS) PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') PsiElement(IDENTIFIER)('Transaction') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Instance') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + MvUseGroupImpl(USE_GROUP) + PsiElement({)('{') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + MvUseGroupImpl(USE_GROUP) + PsiElement({)('{') + MvUseSpeckImpl(USE_SPECK) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Instance') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement(IDENTIFIER)('Self') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('EventHandle') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathAddressImpl(PATH_ADDRESS) @@ -48,96 +88,70 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('Transaction') PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') + PsiElement(IDENTIFIER)('foo') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + MvUseAliasImpl(USE_ALIAS) + PsiElement(as)('as') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('bar') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Self') - PsiElement(,)(',') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + MvUseGroupImpl(USE_GROUP) + PsiElement({)('{') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foo') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foo') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('EventHandle') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) + MvUseAliasImpl(USE_ALIAS) + PsiElement(as)('as') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('bar') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(IDENTIFIER)('foo') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - MvUseAliasImpl(USE_ALIAS) - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement(IDENTIFIER)('Handle') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(IDENTIFIER)('liquidswap') PsiElement(::)('::') PsiElement(IDENTIFIER)('Transaction') PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - MvUseAliasImpl(USE_ALIAS) - PsiElement(as)('as') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Handle') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement(IDENTIFIER)('call') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) @@ -146,147 +160,69 @@ FILE PsiElement(IDENTIFIER)('Transaction') PsiElement(::)('::') PsiElement(IDENTIFIER)('call') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Handle') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('liquidswap') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('call') + PsiElement(IDENTIFIER)('liquidswap') PsiElement(::)('::') - PsiElement(IDENTIFIER)('Handle') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('call') + PsiElement(::)('::') + MvUseGroupImpl(USE_GROUP) + PsiElement({)('{') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Handle1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Handle2') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('liquidswap') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('call') - PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Handle1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Handle2') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x2') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Mango') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiElement(})('}') - PsiElement(})('}') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') - PsiWhiteSpace(' ') MvCodeBlockImpl(CODE_BLOCK) PsiElement({)('{') PsiWhiteSpace('\n ') @@ -301,10 +237,73 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('Transaction') PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace('\n ') PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x2') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Mango') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(})('}') + PsiElement(})('}') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/vectors.txt b/src/test/resources/org/move/lang/parser/complete/vectors.txt index 37492c759..3e2e144c4 100644 --- a/src/test/resources/org/move/lang/parser/complete/vectors.txt +++ b/src/test/resources/org/move/lang/parser/complete/vectors.txt @@ -7,124 +7,123 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('vectors') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvUseStmtImpl(USE_STMT) + PsiElement(use)('use') + PsiWhiteSpace(' ') + MvUseSpeckImpl(USE_SPECK) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('std') - PsiElement(::)('::') + PsiElement(IDENTIFIER)('std') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('vector') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvVectorLitExprImpl(VECTOR_LIT_EXPR) PsiElement(IDENTIFIER)('vector') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + PsiWhiteSpace('\n ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('type_info') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('type_info') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - PsiWhiteSpace('\n ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('type_info') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('type_info') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('3') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('3') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('add') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(IDENTIFIER)('vector') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('add') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/complete/while_loop_inline_assignment.txt b/src/test/resources/org/move/lang/parser/complete/while_loop_inline_assignment.txt index 2ccc8e65b..ee749f733 100644 --- a/src/test/resources/org/move/lang/parser/complete/while_loop_inline_assignment.txt +++ b/src/test/resources/org/move/lang/parser/complete/while_loop_inline_assignment.txt @@ -2,79 +2,122 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInlineBlockImpl(INLINE_BLOCK) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') - PsiElement())(')') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvInlineBlockImpl(INLINE_BLOCK) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInlineBlockImpl(INLINE_BLOCK) + MvParensExprImpl(PARENS_EXPR) PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') PsiWhiteSpace(' ') MvAssignmentExprImpl(ASSIGNMENT_EXPR) MvRefExprImpl(REF_EXPR) @@ -95,31 +138,67 @@ FILE MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInlineBlockImpl(INLINE_BLOCK) + MvAnnotatedExprImpl(ANNOTATED_EXPR) PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') PsiElement())(')') - PsiWhiteSpace(' ') - MvInlineBlockImpl(INLINE_BLOCK) + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') + PsiWhiteSpace(' ') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInlineBlockImpl(INLINE_BLOCK) + MvAnnotatedExprImpl(ANNOTATED_EXPR) + PsiElement(()('(') + PsiWhiteSpace(' ') MvParensExprImpl(PARENS_EXPR) PsiElement(()('(') - PsiWhiteSpace(' ') MvAssignmentExprImpl(ASSIGNMENT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) @@ -138,96 +217,16 @@ FILE PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') - PsiElement())(')') - PsiWhiteSpace(' ') - MvInlineBlockImpl(INLINE_BLOCK) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[<]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') PsiElement())(')') - PsiWhiteSpace(' ') - MvInlineBlockImpl(INLINE_BLOCK) - MvAnnotatedExprImpl(ANNOTATED_EXPR) - PsiElement(()('(') - PsiWhiteSpace(' ') - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/assignments.txt b/src/test/resources/org/move/lang/parser/partial/assignments.txt index 7bd033937..b1652bdea 100644 --- a/src/test/resources/org/move/lang/parser/partial/assignments.txt +++ b/src/test/resources/org/move/lang/parser/partial/assignments.txt @@ -2,214 +2,215 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiErrorElement: expected, got ';' + + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiErrorElement: expected, got '=' + + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiErrorElement:'::', ';', or '=' expected, got '1' + PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiErrorElement:';' expected, got 'let' + + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvTuplePatImpl(TUPLE_PAT) + PsiElement(()('(') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiErrorElement: expected, got ';' + + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvTuplePatImpl(TUPLE_PAT) + PsiElement(()('(') MvBindingPatImpl(BINDING_PAT) PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') + PsiErrorElement:')', ',', '::', or '{' expected, got '+' + PsiElement(+)('+') + PsiElement(+)('+') + PsiElement(+)('+') + PsiWhiteSpace(' ') + PsiElement())(')') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDerefExprImpl(DEREF_EXPR) + PsiElement(*)('*') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') MvInitializerImpl(INITIALIZER) PsiElement(=)('=') PsiErrorElement: expected, got ';' + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiErrorElement: expected, got '=' - + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) + PsiErrorElement:',' or '}' expected, got '=' PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiErrorElement:'::', ';', or '=' expected, got '1' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiErrorElement:';' expected, got 'let' - - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) + PsiWhiteSpace('\n ') PsiElement(let)('let') PsiWhiteSpace(' ') - MvTuplePatImpl(TUPLE_PAT) - PsiElement(()('(') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('R') + PsiWhiteSpace(' ') + PsiErrorElement:',' or '}' expected, got '{' + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) MvBindingPatImpl(BINDING_PAT) PsiElement(IDENTIFIER)('a') - PsiElement(,)(',') - PsiWhiteSpace(' ') + PsiErrorElement:',' or '}' expected, got ';' + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - PsiElement())(')') + PsiElement(IDENTIFIER)('R') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiErrorElement: expected, got ';' - + PsiErrorElement:',' or '}' expected, got '{' + PsiElement({)('{') PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiErrorElement:'(', ';', , , , '=' or _ expected, got '(' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiErrorElement:'+', , or '=' expected, got '+' - - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiErrorElement:'+', , or '=' expected, got '+' - - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiErrorElement:':', , , '=' or '[' expected, got ')' - - PsiWhiteSpace(' ') - PsiElement())(')') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDerefExprImpl(DEREF_EXPR) - PsiElement(*)('*') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiErrorElement: expected, got ';' - + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiErrorElement:',' or '}' expected, got '=' - PsiElement(=)('=') - PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - PsiErrorElement:',' or '}' expected, got '{' - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiErrorElement:',' or '}' expected, got ';' - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('R') - PsiWhiteSpace(' ') - PsiErrorElement:',' or '}' expected, got '{' - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - PsiElement(})('}') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiErrorElement: expected, got ';' + + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('record') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('val') PsiWhiteSpace(' ') MvInitializerImpl(INITIALIZER) PsiElement(=)('=') PsiErrorElement: expected, got ';' - PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') MvAssignmentExprImpl(ASSIGNMENT_EXPR) MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) @@ -221,31 +222,12 @@ FILE PsiWhiteSpace(' ') MvInitializerImpl(INITIALIZER) PsiElement(=)('=') - PsiErrorElement: expected, got ';' + PsiErrorElement:':', , , '=' or '[' expected, got ')' PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('record') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('val') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiErrorElement:':', , , '=' or '[' expected, got ')' - - PsiWhiteSpace(' ') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/dot_exprs.txt b/src/test/resources/org/move/lang/parser/partial/dot_exprs.txt index bc6bcf186..645dcf97f 100644 --- a/src/test/resources/org/move/lang/parser/partial/dot_exprs.txt +++ b/src/test/resources/org/move/lang/parser/partial/dot_exprs.txt @@ -7,211 +7,210 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('dot_exprs') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('m') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got 'assert' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got 'S' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvStructLitExprImpl(STRUCT_LIT_EXPR) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('m') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:IDENTIFIER expected, got 'assert' + + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('bin') PsiElement(.)('.') - PsiErrorElement:'vector' unexpected - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvVectorLitExprImpl(VECTOR_LIT_EXPR) - PsiElement(IDENTIFIER)('vector') - MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) - PsiElement([)('[') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('field') - PsiErrorElement:';' expected, got 'bin' + PsiErrorElement:IDENTIFIER expected, got 'S' - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + PsiWhiteSpace(' ') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) PsiElement(IDENTIFIER)('field') - PsiErrorElement:';' expected, got 'bin' + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:'vector' unexpected + + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvVectorLitExprImpl(VECTOR_LIT_EXPR) + PsiElement(IDENTIFIER)('vector') + MvVectorLitItemsImpl(VECTOR_LIT_ITEMS) + PsiElement([)('[') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiErrorElement:';' expected, got 'bin' + + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('field') + PsiErrorElement:';' expected, got 'bin' + + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:IDENTIFIER expected, got 'aptos_token' - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got 'aptos_token' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('aptos_token') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('get_token') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got 'b"' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"') - PsiErrorElement:';' expected, got 'bin' + PsiElement(IDENTIFIER)('aptos_token') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('get_token') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:IDENTIFIER expected, got 'b"' - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got 'x"' - - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x"') - PsiErrorElement:';' expected, got 'bin' + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"') + PsiErrorElement:';' expected, got 'bin' + + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:IDENTIFIER expected, got 'x"' - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got 'return' - - PsiWhiteSpace(' ') - MvReturnExprImpl(RETURN_EXPR) - PsiElement(return)('return') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('receiver') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x"') + PsiErrorElement:';' expected, got 'bin' + + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:IDENTIFIER expected, got 'return' + PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[>]) - MvBinaryExprImpl(BINARY_EXPR[<]) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('no_type_args_without_colon_colon') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') + MvReturnExprImpl(RETURN_EXPR) + PsiElement(return)('return') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('receiver') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[<]) + MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('no_type_args_without_colon_colon') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(<)('<') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + PsiErrorElement: expected, got ')' + + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/expressions.txt b/src/test/resources/org/move/lang/parser/partial/expressions.txt index 466b8ff90..dd8467fff 100644 --- a/src/test/resources/org/move/lang/parser/partial/expressions.txt +++ b/src/test/resources/org/move/lang/parser/partial/expressions.txt @@ -2,160 +2,159 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('m') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bin') - PsiElement(.)('.') - PsiErrorElement:IDENTIFIER expected, got ';' - - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_STRING_LITERAL)('x"') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BYTE_STRING_LITERAL)('b"') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('m') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RMRK') - PsiErrorElement:';' expected, got 'RMRK' + PsiElement(IDENTIFIER)('bin') + PsiElement(.)('.') + PsiErrorElement:IDENTIFIER expected, got ';' - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_STRING_LITERAL)('x"') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BYTE_STRING_LITERAL)('b"') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RMRK') + PsiErrorElement:';' expected, got 'RMRK' + + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RMRK') - PsiElement(::)('::') - PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got '0x1' - - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('RMRK') + PsiElement(::)('::') + PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got '0x1' + + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement(::)('::') + PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' + + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) MvPathAddressImpl(PATH_ADDRESS) PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') - PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' - - PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('RMRK') + PsiElement(::)('::') + PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' + + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RMRK') + PsiElement(IDENTIFIER)('Sender') PsiElement(::)('::') - PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' - - PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + PsiElement(IDENTIFIER)('RMRK') + PsiElement(::)('::') + PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' + + PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Sender') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('RMRK') + PsiElement(IDENTIFIER)('Sender') PsiElement(::)('::') - PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' - + PsiElement(IDENTIFIER)('RMRK') + PsiElement(::)('::') + PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got 'while' + + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvWhileExprImpl(WHILE_EXPR) + PsiElement(while)('while') PsiWhiteSpace(' ') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiErrorElement:';' expected, got 'return' + + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvReturnExprImpl(RETURN_EXPR) + PsiElement(return)('return') + PsiWhiteSpace('\n ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0hello') + PsiErrorElement:';' expected, got 'RMRK' + + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Sender') - PsiElement(::)('::') PsiElement(IDENTIFIER)('RMRK') PsiElement(::)('::') - PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got 'while' + PsiErrorElement:'::', <, or IDENTIFIER expected, got '::' - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvWhileExprImpl(WHILE_EXPR) - PsiElement(while)('while') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiErrorElement:';' expected, got 'return' - - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvReturnExprImpl(RETURN_EXPR) - PsiElement(return)('return') - PsiWhiteSpace('\n ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0hello') - PsiErrorElement:';' expected, got 'RMRK' - - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RMRK') - PsiElement(::)('::') - PsiErrorElement:'::', <, or IDENTIFIER expected, got '::' - - PsiWhiteSpace(' ') - PsiElement(::)('::') - PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' - - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(::)('::') + PsiErrorElement:'::', <, , IDENTIFIER or '{' expected, got ';' + + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/function_calls.txt b/src/test/resources/org/move/lang/parser/partial/function_calls.txt index 09d5224af..5ae12ca7d 100644 --- a/src/test/resources/org/move/lang/parser/partial/function_calls.txt +++ b/src/test/resources/org/move/lang/parser/partial/function_calls.txt @@ -2,367 +2,366 @@ FILE MvScriptImpl(SCRIPT) PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:')', ',', '::', , '=' or '[' expected, got ';' + + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[+]) MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiErrorElement:')', ',', '::', , '=' or '[' expected, got ';' - - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiErrorElement: expected, got ')' + + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[+]) MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('2') - PsiElement(,)(',') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ',' + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiErrorElement: expected, got ')' - PsiElement(,)(',') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(,)(',') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(,)(',') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('4') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('assert') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiErrorElement:';' expected, got 'foo4' + + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foo4') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ';' + + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foo5') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ';' + + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foo6') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got 'let' + + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('foo7') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('assert') + PsiErrorElement:'!', ')', ',', '::', , , '=', '[' or '{' expected, got ';' + + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('call') MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(,)(',') MvValueArgumentImpl(VALUE_ARGUMENT) PsiErrorElement: expected, got ',' PsiElement(,)(',') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('4') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('assert') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') PsiElement())(')') - PsiErrorElement:';' expected, got 'foo4' - - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo4') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ';' - - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo5') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ';' + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiErrorElement: expected, got ')' - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo6') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got 'let' + PsiWhiteSpace(' ') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBorrowExprImpl(BORROW_EXPR) + PsiElement(&)('&') + PsiElement(mut)('mut') + PsiErrorElement: expected, got ')' - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('foo7') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('assert') - PsiErrorElement:'!', ')', ',', '::', , , '=', '[' or '{' expected, got ';' + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('call10') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ',' - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ',' - - PsiElement(,)(',') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiErrorElement: expected, got ')' - - PsiWhiteSpace(' ') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement(,)(',') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + MvValueArgumentImpl(VALUE_ARGUMENT) + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('s') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('val') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiErrorElement: expected, got ')' + + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[!=]) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('s') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('val') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(!=)('!=') + PsiErrorElement: expected, got ')' + + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvAssertBangExprImpl(ASSERT_BANG_EXPR) + PsiElement(IDENTIFIER)('assert') + PsiElement(!)('!') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('s') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('val') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiErrorElement: expected, got ')' + + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('call') MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') MvValueArgumentImpl(VALUE_ARGUMENT) - MvBorrowExprImpl(BORROW_EXPR) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiErrorElement: expected, got ')' - - PsiWhiteSpace(' ') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call10') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ',' - - PsiElement(,)(',') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ',' - + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') PsiElement(,)(',') + PsiWhiteSpace('\n ') MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got ',' + PsiErrorElement: expected, got '}' - PsiElement(,)(',') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('s') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('val') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[!=]) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('s') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('val') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(!=)('!=') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvAssertBangExprImpl(ASSERT_BANG_EXPR) - PsiElement(IDENTIFIER)('assert') - PsiElement(!)('!') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('s') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('val') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('call') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvValueArgumentImpl(VALUE_ARGUMENT) - PsiErrorElement: expected, got '}' - - PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/function_signatures.txt b/src/test/resources/org/move/lang/parser/partial/function_signatures.txt index c0364a9b4..80bcdd526 100644 --- a/src/test/resources/org/move/lang/parser/partial/function_signatures.txt +++ b/src/test/resources/org/move/lang/parser/partial/function_signatures.txt @@ -4,519 +4,518 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiErrorElement: expected, got ',' - - PsiElement(,)(',') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiErrorElement: expected, got ')' - - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - PsiErrorElement:'pub' unexpected - PsiElement(IDENTIFIER)('pub') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiErrorElement:'(' or fun expected, got 'public' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(friend_kw)('friend') - PsiElement())(')') - PsiErrorElement:fun expected, got 'public' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(script_kw)('script') - PsiElement())(')') - PsiErrorElement:fun expected, got 'public' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiErrorElement:IDENTIFIER expected, got 'native' - - PsiWhiteSpace('\n\n ') - PsiElement(native)('native') - PsiErrorElement:struct_kw expected, got 'native' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiErrorElement:IDENTIFIER expected, got 'native' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiErrorElement:'(' or fun expected, got 'native' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(friend_kw)('friend') - PsiElement())(')') - PsiErrorElement:fun expected, got 'native' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiElement(()('(') - PsiElement(script_kw)('script') - PsiElement())(')') - PsiErrorElement:fun expected, got 'native' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - MvVisibilityModifierImpl(VISIBILITY_MODIFIER) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiErrorElement:IDENTIFIER expected, got 'fun' - - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_01') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiErrorElement: expected, got 'b' - - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_02') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiErrorElement:IDENTIFIER expected, got ',' + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiErrorElement: expected, got ',' - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_03') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - PsiErrorElement: or mut expected, got ',' - - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_1') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvParensTypeImpl(PARENS_TYPE) - PsiElement(()('(') + PsiElement(,)(',') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') - PsiErrorElement:')', ',', '::' or expected, got '{' - - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvTupleTypeImpl(TUPLE_TYPE) - PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + PsiErrorElement: expected, got ')' + + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiErrorElement:')' or expected, got '{' + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiErrorElement: expected, got ')' + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + PsiErrorElement:'pub' unexpected + PsiElement(IDENTIFIER)('pub') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiErrorElement:'(' or fun expected, got 'public' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(friend_kw)('friend') + PsiElement())(')') + PsiErrorElement:fun expected, got 'public' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(script_kw)('script') + PsiElement())(')') + PsiErrorElement:fun expected, got 'public' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiErrorElement:IDENTIFIER expected, got 'native' + + PsiWhiteSpace('\n\n ') + PsiElement(native)('native') + PsiErrorElement:struct_kw expected, got 'native' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiErrorElement:IDENTIFIER expected, got 'native' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiErrorElement:'(' or fun expected, got 'native' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(friend_kw)('friend') + PsiElement())(')') + PsiErrorElement:fun expected, got 'native' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiElement(()('(') + PsiElement(script_kw)('script') + PsiElement())(')') + PsiErrorElement:fun expected, got 'native' + + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + MvVisibilityModifierImpl(VISIBILITY_MODIFIER) + PsiElement(public)('public') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiErrorElement:IDENTIFIER expected, got 'fun' + + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_01') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiErrorElement: expected, got 'b' + PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_3') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvTupleTypeImpl(TUPLE_TYPE) - PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_02') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiErrorElement:IDENTIFIER expected, got ',' + + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('u8') - PsiErrorElement:')', ',', '::', or expected, got '{' - - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_5') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - PsiErrorElement:':' or acquires expected, got 'acq' - PsiElement(IDENTIFIER)('acq') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_03') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + PsiErrorElement: or mut expected, got ',' + + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_6') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('b') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_1') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvParensTypeImpl(PARENS_TYPE) PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') - PsiErrorElement: expected, got '{' + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiErrorElement:')', ',', '::' or expected, got '{' - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_7') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvTupleTypeImpl(TUPLE_TYPE) PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('U') + PsiElement(IDENTIFIER)('u8') PsiElement(,)(',') - PsiErrorElement: expected, got ',' - PsiElement(,)(',') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_8') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiErrorElement:')' or expected, got '{' + + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_3') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvTupleTypeImpl(TUPLE_TYPE) PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvAcquiresTypeImpl(ACQUIRES_TYPE) - PsiElement(acquires)('acquires') - PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('U') + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiErrorElement:',', '::' or expected, got 'V' - PsiElement(IDENTIFIER)('V') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_11') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - PsiErrorElement:IDENTIFIER or phantom expected, got '(' - - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_12') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('U') - PsiErrorElement:',', ':' or '>' expected, got '(' + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiErrorElement:')', ',', '::', or expected, got '{' - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_13') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_5') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiErrorElement:':' or acquires expected, got 'acq' + PsiElement(IDENTIFIER)('acq') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_6') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') + PsiErrorElement: expected, got '{' + + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_7') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) PsiElement(IDENTIFIER)('U') + PsiElement(,)(',') + PsiErrorElement: expected, got ',' PsiElement(,)(',') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('V') - PsiElement(,)(',') - PsiErrorElement:IDENTIFIER or phantom expected, got '(' - - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_14') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_8') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvAcquiresTypeImpl(ACQUIRES_TYPE) + PsiElement(acquires)('acquires') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) PsiElement(IDENTIFIER)('U') - PsiErrorElement:',', ':' or '>' expected, got 'V' - - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('V') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiErrorElement:',', '::' or expected, got 'V' + PsiElement(IDENTIFIER)('V') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_11') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + PsiErrorElement:IDENTIFIER or phantom expected, got '(' + + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_12') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + PsiErrorElement:',', ':' or '>' expected, got '(' + + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_13') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + PsiElement(,)(',') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('V') + PsiElement(,)(',') + PsiErrorElement:IDENTIFIER or phantom expected, got '(' + + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_14') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + PsiErrorElement:',', ':' or '>' expected, got 'V' + PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main_15') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('U') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - PsiErrorElement: expected, got ',' - - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('V') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('store') - PsiElement(+)('+') - PsiErrorElement: expected, got ',' - - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') - MvTypeParamBoundImpl(TYPE_PARAM_BOUND) - PsiElement(:)(':') - MvAbilityImpl(ABILITY) - PsiElement(IDENTIFIER)('drop') - PsiElement(+)('+') - PsiErrorElement: expected, got '>' - - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('V') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main_15') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('V') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('store') + PsiElement(+)('+') + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + MvTypeParamBoundImpl(TYPE_PARAM_BOUND) + PsiElement(:)(':') + MvAbilityImpl(ABILITY) + PsiElement(IDENTIFIER)('drop') + PsiElement(+)('+') + PsiErrorElement: expected, got '>' + + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/module_const.txt b/src/test/resources/org/move/lang/parser/partial/module_const.txt index f250daca3..1e97c60b5 100644 --- a/src/test/resources/org/move/lang/parser/partial/module_const.txt +++ b/src/test/resources/org/move/lang/parser/partial/module_const.txt @@ -4,113 +4,112 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MY_CONST') - PsiErrorElement: expected, got 'const' + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MY_CONST') + PsiErrorElement: expected, got 'const' + + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MY_CONST') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiErrorElement: expected, got 'const' - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MY_CONST') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MY_CONST') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiErrorElement: expected, got 'const' - - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiErrorElement:'::', or '=' expected, got 'const' + + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MY_CONST') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MY_CONST') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiErrorElement:'::', or '=' expected, got 'const' + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiErrorElement: expected, got 'const' - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MY_CONST') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MY_CONST') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiErrorElement: expected, got 'const' - - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MY_CONST') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiErrorElement:'::', ';', , '=' or '[' expected, got 'const' - - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:'::', ';', , '=' or '[' expected, got 'const' + + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('CONST_NO_TYPE') + PsiErrorElement: expected, got '=' + + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('CONST_NO_TYPE') - PsiErrorElement: expected, got '=' + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvConstImpl(CONST) + PsiElement(const_kw)('const') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('CONST_NO_TYPE_WITH_COMMA') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiErrorElement: expected, got '=' + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvConstImpl(CONST) - PsiElement(const_kw)('const') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('CONST_NO_TYPE_WITH_COMMA') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiErrorElement: expected, got '=' - - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/module_uses.txt b/src/test/resources/org/move/lang/parser/partial/module_uses.txt deleted file mode 100644 index 640a77f0a..000000000 --- a/src/test/resources/org/move/lang/parser/partial/module_uses.txt +++ /dev/null @@ -1,244 +0,0 @@ -FILE - MvModuleImpl(MODULE) - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('M') - PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiErrorElement: expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - PsiElement(DIEM_ADDRESS)('0x0') - PsiErrorElement:'::' expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Std') - PsiErrorElement:'::', ';', or as expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Std') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiErrorElement:'::', ';', or as expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got ';' - - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('create') - PsiErrorElement:'::', ';', or as expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - PsiErrorElement: expected, got 'use' - - PsiWhiteSpace('\n ') - PsiElement(use)('use') - PsiWhiteSpace(' ') - PsiElement(DIEM_ADDRESS)('0x0') - PsiErrorElement: expected, got '::' - - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement({)('{') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('create') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - PsiErrorElement:'use' unexpected - PsiElement(use)('use') - PsiWhiteSpace(' ') - PsiElement(DIEM_ADDRESS)('0x0') - PsiErrorElement: expected, got '::' - - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement({)('{') - PsiElement(IDENTIFIER)('create') - PsiElement(,)(',') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('create') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('modify') - PsiElement(,)(',') - PsiErrorElement:',' unexpected - PsiElement(,)(',') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - MvUseGroupImpl(USE_GROUP) - PsiElement({)('{') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('create') - PsiWhiteSpace(' ') - MvUseAliasImpl(USE_ALIAS) - PsiElement(as)('as') - PsiErrorElement:IDENTIFIER expected, got ',' - - PsiWhiteSpace(' ') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('update') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/spec.txt b/src/test/resources/org/move/lang/parser/partial/spec.txt index e2ec4edba..81ddbad92 100644 --- a/src/test/resources/org/move/lang/parser/partial/spec.txt +++ b/src/test/resources/org/move/lang/parser/partial/spec.txt @@ -7,182 +7,181 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiErrorElement:IDENTIFIER, fun, module or native expected, got 'spec' - - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('my_function') - PsiErrorElement: or '{' expected, got 'spec' - - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('MyStruct') - PsiErrorElement: or '{' expected, got 'spec' - - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiErrorElement:'{' expected, got 'spec' - - PsiWhiteSpace('\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiErrorElement:IDENTIFIER expected, got 'spec' - - PsiWhiteSpace('\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('myfun') - PsiErrorElement:'(' or expected, got 'spec' - - PsiWhiteSpace('\n ') - MvSchemaImpl(SCHEMA) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(schema_kw)('schema') - PsiErrorElement:IDENTIFIER expected, got 'spec' - - PsiWhiteSpace('\n ') - MvSchemaImpl(SCHEMA) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(schema_kw)('schema') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('MySchema') - PsiErrorElement: or '{' expected, got 'fun' - - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('m') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiErrorElement:IDENTIFIER, fun, module or native expected, got 'spec' + + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('my_function') + PsiErrorElement: or '{' expected, got 'spec' + + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('MyStruct') + PsiErrorElement: or '{' expected, got 'spec' + + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiErrorElement:'{' expected, got 'spec' + + PsiWhiteSpace('\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiErrorElement:IDENTIFIER expected, got 'spec' + + PsiWhiteSpace('\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('myfun') + PsiErrorElement:'(' or expected, got 'spec' + + PsiWhiteSpace('\n ') + MvSchemaImpl(SCHEMA) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(schema_kw)('schema') + PsiErrorElement:IDENTIFIER expected, got 'spec' + + PsiWhiteSpace('\n ') + MvSchemaImpl(SCHEMA) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(schema_kw)('schema') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('MySchema') + PsiErrorElement: or '{' expected, got 'fun' + + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('m') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('assume') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('assume') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('exists') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiErrorElement:'::', , '=' or '[' expected, got '==' - PsiElement(==)('==') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('exists') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') + PsiErrorElement:'::', , '=' or '[' expected, got '==' + PsiElement(==)('==') + PsiElement(>)('>') PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Schema') - PsiErrorElement:'::', ';', , '{' or '}' expected, got 'assert' + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Schema') + PsiErrorElement:'::', ';', , '{' or '}' expected, got 'assert' + + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAssertSpecExprImpl(ASSERT_SPEC_EXPR) + PsiElement(assert_kw)('assert') + PsiErrorElement: or '[' expected, got ';' - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAssertSpecExprImpl(ASSERT_SPEC_EXPR) - PsiElement(assert_kw)('assert') - PsiErrorElement: or '[' expected, got ';' - - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAssumeSpecExprImpl(ASSUME_SPEC_EXPR) - PsiElement(assume_kw)('assume') - PsiErrorElement:, or '[' expected, got ';' + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAssumeSpecExprImpl(ASSUME_SPEC_EXPR) + PsiElement(assume_kw)('assume') + PsiErrorElement:, or '[' expected, got ';' + + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAssumeSpecExprImpl(ASSUME_SPEC_EXPR) + PsiElement(assume_kw)('assume') + PsiWhiteSpace(' ') + MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) + PsiElement(exists_kw)('exists') + PsiErrorElement:IDENTIFIER expected, got '1' - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAssumeSpecExprImpl(ASSUME_SPEC_EXPR) - PsiElement(assume_kw)('assume') PsiWhiteSpace(' ') - MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) - PsiElement(exists_kw)('exists') - PsiErrorElement:IDENTIFIER expected, got '1' - - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) PsiElement(ensures_kw)('ensures') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvBinaryExprImpl(BINARY_EXPR[==>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('result') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/struct_decls.txt b/src/test/resources/org/move/lang/parser/partial/struct_decls.txt index 77202a0e4..425008303 100644 --- a/src/test/resources/org/move/lang/parser/partial/struct_decls.txt +++ b/src/test/resources/org/move/lang/parser/partial/struct_decls.txt @@ -7,74 +7,73 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiErrorElement:IDENTIFIER expected, got 'native' - - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(struct_kw)('struct') - PsiErrorElement:IDENTIFIER expected, got 'struct' - - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('S') - PsiErrorElement: or '{' expected, got 'struct' - - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiErrorElement:IDENTIFIER expected, got '{' - - PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('S1') - PsiErrorElement:';' or expected, got 'struct' - - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('S') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(phantom)('phantom') - PsiErrorElement:IDENTIFIER expected, got '>' - - PsiElement(>)('>') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('S') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(phantom)('phantom') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('Type') - PsiElement(,)(',') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiErrorElement:IDENTIFIER expected, got 'native' + + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(struct_kw)('struct') + PsiErrorElement:IDENTIFIER expected, got 'struct' + + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('S') + PsiErrorElement: or '{' expected, got 'struct' + + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiErrorElement:IDENTIFIER expected, got '{' + + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('S1') + PsiErrorElement:';' or expected, got 'struct' + + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('S') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(phantom)('phantom') + PsiErrorElement:IDENTIFIER expected, got '>' + + PsiElement(>)('>') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('S') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(phantom)('phantom') PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(phantom)('phantom') - PsiErrorElement:IDENTIFIER expected, got '>' - - PsiElement(>)('>') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(IDENTIFIER)('Type') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(phantom)('phantom') + PsiErrorElement:IDENTIFIER expected, got '>' + + PsiElement(>)('>') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/struct_fields.txt b/src/test/resources/org/move/lang/parser/partial/struct_fields.txt index 575623954..4f47eac50 100644 --- a/src/test/resources/org/move/lang/parser/partial/struct_fields.txt +++ b/src/test/resources/org/move/lang/parser/partial/struct_fields.txt @@ -4,430 +4,423 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiErrorElement: expected, got ':' + + PsiWhiteSpace('\n ') + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiErrorElement: expected, got ':' + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('u8') + PsiErrorElement: expected, got ',' - PsiWhiteSpace('\n ') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('u8') - PsiErrorElement: expected, got ',' + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('my_field') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('my_field') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiErrorElement: expected, got ',' - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('my_field') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('my_field') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiErrorElement: expected, got ',' - + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('my_field') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('my_field') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiErrorElement:',', '::', or '}' expected, got 'my_field' + + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('my_field') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvStructImpl(STRUCT) + PsiElement(struct_kw)('struct') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('NoTypesFields') + PsiWhiteSpace(' ') + MvBlockFieldsImpl(BLOCK_FIELDS) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('field1') + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('field2') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiErrorElement: expected, got ',' + + PsiElement(,)(',') + PsiWhiteSpace('\n ') + MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiElement(IDENTIFIER)('field3') + PsiErrorElement: expected, got '}' + + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') PsiWhiteSpace(' ') - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('my_field') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('my_field') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiErrorElement:',', '::', or '}' expected, got 'my_field' + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('my') + PsiElement(:)(':') + PsiErrorElement: expected, got '}' - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('my') + PsiElement(:)(':') + PsiWhiteSpace(' ') + PsiErrorElement: expected, got ',' + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('my_field') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('my') + PsiElement(:)(':') + PsiWhiteSpace(' ') + PsiErrorElement: expected, got ',' + PsiElement(,)(',') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('my_field') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvStructImpl(STRUCT) - PsiElement(struct_kw)('struct') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('NoTypesFields') - PsiWhiteSpace(' ') - MvBlockFieldsImpl(BLOCK_FIELDS) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('field1') - PsiErrorElement: expected, got ',' + PsiElement(:)(':') + PsiWhiteSpace(' ') + PsiErrorElement: expected, got ',' + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('my_field2') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('my') + PsiErrorElement:',' or '}' expected, got 'myfield' - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('field2') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiErrorElement: expected, got ',' - - PsiElement(,)(',') - PsiWhiteSpace('\n ') - MvNamedFieldDeclImpl(NAMED_FIELD_DECL) - PsiElement(IDENTIFIER)('field3') - PsiErrorElement: expected, got '}' + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('myfield') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvStructPatImpl(STRUCT_PAT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace(' ') + MvFieldPatImpl(FIELD_PAT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('my') + PsiErrorElement:',' or '}' expected, got 'myfield' - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') + MvFieldPatImpl(FIELD_PAT) + PsiElement(IDENTIFIER)('myfield') + MvFieldPatBindingImpl(FIELD_PAT_BINDING) + PsiElement(:)(':') PsiWhiteSpace(' ') + MvWildPatImpl(WILD_PAT) + PsiElement(IDENTIFIER)('_') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') + PsiWhiteSpace('\n\n') + MvModuleImpl(MODULE) + PsiElement(module)('module') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('M') + PsiWhiteSpace(' ') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) PsiElement(IDENTIFIER)('my') PsiElement(:)(':') - PsiErrorElement: expected, got '}' + PsiErrorElement: expected, got '}' - PsiWhiteSpace(' ') - PsiElement(})('}') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) PsiElement(IDENTIFIER)('my') PsiElement(:)(':') - PsiWhiteSpace(' ') - PsiErrorElement: expected, got ',' - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('my_field') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + PsiErrorElement: expected, got ',' + PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('my') - PsiElement(:)(':') - PsiWhiteSpace(' ') - PsiErrorElement: expected, got ',' - PsiElement(,)(',') - PsiWhiteSpace(' ') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) PsiElement(IDENTIFIER)('my_field') PsiElement(:)(':') - PsiWhiteSpace(' ') - PsiErrorElement: expected, got ',' - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('my_field2') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + PsiErrorElement: expected, got ',' + PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('my') - PsiErrorElement:',' or '}' expected, got 'myfield' - - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('myfield') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('my_field2') + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvStructPatImpl(STRUCT_PAT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('my') + PsiErrorElement:',', ':' or '}' expected, got 'myfield' + PsiWhiteSpace(' ') - MvStructPatFieldsBlockImpl(STRUCT_PAT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('my') - PsiErrorElement:',' or '}' expected, got 'myfield' - - PsiWhiteSpace(' ') - MvStructPatFieldImpl(STRUCT_PAT_FIELD) - PsiElement(IDENTIFIER)('myfield') - MvStructPatFieldBindingImpl(STRUCT_PAT_FIELD_BINDING) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvWildPatImpl(WILD_PAT) - PsiElement(IDENTIFIER)('_') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('myfield') + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvModuleImpl(MODULE) - PsiElement(module)('module') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('M') - PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('my') + PsiErrorElement:',', ':' or '}' expected, got 'myfield' + PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my') - PsiElement(:)(':') - PsiErrorElement: expected, got '}' - - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('myfield') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my') - PsiElement(:)(':') - PsiErrorElement: expected, got ',' - - PsiWhiteSpace(' ') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my_field') - PsiElement(:)(':') - PsiErrorElement: expected, got ',' - - PsiWhiteSpace(' ') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my_field2') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvStructLitExprImpl(STRUCT_LIT_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) + PsiElement({)('{') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my') - PsiErrorElement:',', ':' or '}' expected, got 'myfield' - - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('myfield') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('my') + PsiErrorElement:',', ':' or '}' expected, got 'myfield' + PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my') - PsiErrorElement:',', ':' or '}' expected, got 'myfield' - - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('myfield') + MvStructLitFieldImpl(STRUCT_LIT_FIELD) + PsiElement(IDENTIFIER)('myfield') + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvStructLitExprImpl(STRUCT_LIT_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('_') PsiWhiteSpace(' ') - MvStructLitFieldsBlockImpl(STRUCT_LIT_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('my') - PsiErrorElement:',', ':' or '}' expected, got 'myfield' - - PsiWhiteSpace(' ') - MvStructLitFieldImpl(STRUCT_LIT_FIELD) - PsiElement(IDENTIFIER)('myfield') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('_') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/partial/top_level_items.txt b/src/test/resources/org/move/lang/parser/partial/top_level_items.txt index e9ed5c874..6db176219 100644 --- a/src/test/resources/org/move/lang/parser/partial/top_level_items.txt +++ b/src/test/resources/org/move/lang/parser/partial/top_level_items.txt @@ -3,293 +3,220 @@ FILE PsiElement(module)('module') PsiErrorElement:
or IDENTIFIER expected, got 'module' - PsiWhiteSpace('\n') - MvModuleImpl(MODULE) - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvAddressRefImpl(ADDRESS_REF) - MvNamedAddressImpl(NAMED_ADDRESS) - PsiElement(IDENTIFIER)('Std') - PsiElement(::)('::') - PsiErrorElement:IDENTIFIER expected, got 'script' - - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') - PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiErrorElement:IDENTIFIER expected, got '}' - - PsiWhiteSpace('\n') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') - PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') + PsiWhiteSpace('\n') + PsiErrorElement:'#',
, , , , , , , IDENTIFIER or spec expected, got 'module' + PsiElement(module)('module') + PsiElement(DUMMY_BLOCK) + PsiElement(DUMMY_BLOCK) PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(IDENTIFIER)('Std') + PsiElement(::)('::') + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace('\n') + PsiElement(})('}') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') PsiElement(()('(') PsiElement())(')') - PsiErrorElement:'{' expected, got '}' - - PsiWhiteSpace('\n') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') - PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiErrorElement: expected, got 'fun' - - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace('\n') + PsiElement(})('}') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') + PsiElement(use)('use') + PsiWhiteSpace('\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') PsiElement(()('(') PsiElement())(')') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) + PsiElement(DUMMY_BLOCK) PsiElement({)('{') PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') - PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got '}' - - PsiWhiteSpace('\n') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') - PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) - PsiElement(use)('use') - PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got 'fun' - - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace('\n') + PsiElement(})('}') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') + PsiElement(use)('use') + PsiWhiteSpace(' ') + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiWhiteSpace('\n') + PsiElement(})('}') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') + PsiElement(use)('use') + PsiWhiteSpace(' ') + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiWhiteSpace('\n\n ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') PsiElement(()('(') PsiElement())(')') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) + PsiElement(DUMMY_BLOCK) PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') PsiElement(use)('use') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got '}' - + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') PsiWhiteSpace('\n ') PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') + PsiWhiteSpace('\n') + PsiElement(})('}') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) + PsiElement(DUMMY_BLOCK) PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') PsiElement(use)('use') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got 'fun' - - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiWhiteSpace('\n\n ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) + PsiElement(DUMMY_BLOCK) PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') PsiElement(use)('use') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('create') - PsiErrorElement:'::', ';', or as expected, got 'fun' - - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('create') + PsiWhiteSpace('\n\n ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) + PsiElement(DUMMY_BLOCK) PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') PsiElement(use)('use') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiErrorElement:< or IDENTIFIER expected, got ';' - + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) + PsiWhiteSpace('\n\n ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') - PsiWhiteSpace('\n\n') - MvScriptImpl(SCRIPT) - PsiElement(script_kw)('script') + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n\n') + PsiElement(script_kw)('script') PsiWhiteSpace(' ') - MvScriptBlockImpl(SCRIPT_BLOCK) + PsiElement(DUMMY_BLOCK) PsiElement({)('{') - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) + PsiElement(DUMMY_BLOCK) + PsiWhiteSpace('\n ') PsiElement(use)('use') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('create') - PsiErrorElement:'::', ';', or as expected, got 'use' - - PsiWhiteSpace('\n ') - MvUseStmtImpl(USE_STMT) + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('create') + PsiWhiteSpace('\n ') PsiElement(use)('use') PsiWhiteSpace(' ') - MvUseSpeckImpl(USE_SPECK) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x0') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('Transaction') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('modify') + PsiElement(DIEM_ADDRESS)('0x0') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('Transaction') + PsiElement(DUMMY_BLOCK) + PsiElement(::)('::') + PsiElement(IDENTIFIER)('modify') PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) + PsiWhiteSpace('\n\n ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + PsiElement(DUMMY_BLOCK) + PsiElement({)('{') + PsiElement(})('}') PsiWhiteSpace('\n') PsiElement(})('}') PsiWhiteSpace('\n\n') diff --git a/src/test/resources/org/move/lang/parser/specs/apply.txt b/src/test/resources/org/move/lang/parser/specs/apply.txt index e1e610966..f159955b7 100644 --- a/src/test/resources/org/move/lang/parser/specs/apply.txt +++ b/src/test/resources/org/move/lang/parser/specs/apply.txt @@ -4,179 +4,178 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) - PsiElement(apply_kw)('apply') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) + PsiElement(apply_kw)('apply') + PsiWhiteSpace(' ') + MvSchemaRefImpl(SCHEMA_REF) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Foo') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('S') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvApplyToImpl(APPLY_TO) + PsiElement(to_kw)('to') PsiWhiteSpace(' ') - MvSchemaRefImpl(SCHEMA_REF) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Foo') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('S') - PsiElement(>)('>') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('*foo') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) + PsiElement(apply_kw)('apply') + PsiWhiteSpace(' ') + MvSchemaRefImpl(SCHEMA_REF) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('ExactlyOne') + PsiWhiteSpace(' ') + MvApplyToImpl(APPLY_TO) + PsiElement(to_kw)('to') PsiWhiteSpace(' ') - MvApplyToImpl(APPLY_TO) - PsiElement(to_kw)('to') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('*foo') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) - PsiElement(apply_kw)('apply') - PsiWhiteSpace(' ') - MvSchemaRefImpl(SCHEMA_REF) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('ExactlyOne') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('*') + PsiWhiteSpace(' ') + MvApplyExceptImpl(APPLY_EXCEPT) + PsiElement(except_kw)('except') PsiWhiteSpace(' ') - MvApplyToImpl(APPLY_TO) - PsiElement(to_kw)('to') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('*') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('initialize') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) + PsiElement(apply_kw)('apply') + PsiWhiteSpace(' ') + MvSchemaRefImpl(SCHEMA_REF) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('ModuleInvariant') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Y') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvApplyToImpl(APPLY_TO) + PsiElement(to_kw)('to') PsiWhiteSpace(' ') - MvApplyExceptImpl(APPLY_EXCEPT) - PsiElement(except_kw)('except') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('initialize') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) - PsiElement(apply_kw)('apply') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('*foo*') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Y') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) + PsiElement(apply_kw)('apply') + PsiWhiteSpace(' ') + MvSchemaRefImpl(SCHEMA_REF) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('EnsuresHasKeyRotationCap') PsiWhiteSpace(' ') - MvSchemaRefImpl(SCHEMA_REF) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('ModuleInvariant') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Y') - PsiElement(>)('>') + PsiElement({)('{') PsiWhiteSpace(' ') - MvApplyToImpl(APPLY_TO) - PsiElement(to_kw)('to') + MvApplySchemaNameAttributeImpl(APPLY_SCHEMA_NAME_ATTRIBUTE) + PsiElement(IDENTIFIER)('account') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('*foo*') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Y') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) - PsiElement(apply_kw)('apply') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('new_account') PsiWhiteSpace(' ') - MvSchemaRefImpl(SCHEMA_REF) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('EnsuresHasKeyRotationCap') - PsiWhiteSpace(' ') - PsiElement({)('{') - PsiWhiteSpace(' ') - MvApplySchemaNameAttributeImpl(APPLY_SCHEMA_NAME_ATTRIBUTE) - PsiElement(IDENTIFIER)('account') - PsiElement(:)(':') + PsiElement(})('}') + PsiWhiteSpace(' ') + MvApplyToImpl(APPLY_TO) + PsiElement(to_kw)('to') + PsiWhiteSpace(' ') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('make_account') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) + PsiElement(apply_kw)('apply') + PsiWhiteSpace(' ') + MvSchemaRefImpl(SCHEMA_REF) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('ModuleInvariant') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('new_account') - PsiWhiteSpace(' ') - PsiElement(})('}') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Y') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvApplyToImpl(APPLY_TO) + PsiElement(to_kw)('to') PsiWhiteSpace(' ') - MvApplyToImpl(APPLY_TO) - PsiElement(to_kw)('to') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('make_account') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) - PsiElement(apply_kw)('apply') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('*foo*') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Y') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvSchemaRefImpl(SCHEMA_REF) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('ModuleInvariant') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Y') - PsiElement(>)('>') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('bar') + PsiWhiteSpace(' ') + MvApplyExceptImpl(APPLY_EXCEPT) + PsiElement(except_kw)('except') PsiWhiteSpace(' ') - MvApplyToImpl(APPLY_TO) - PsiElement(to_kw)('to') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(public)('public') PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('*foo*') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Y') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('bar') + PsiElement(FUNCTION_PATTERN_IDENT)('*') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvApplyExceptImpl(APPLY_EXCEPT) - PsiElement(except_kw)('except') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(public)('public') - PsiWhiteSpace(' ') - PsiElement(FUNCTION_PATTERN_IDENT)('*') - PsiElement(,)(',') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(internal_kw)('internal') PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(internal_kw)('internal') - PsiWhiteSpace(' ') - PsiElement(FUNCTION_PATTERN_IDENT)('baz') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') + PsiElement(FUNCTION_PATTERN_IDENT)('baz') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/conditions.txt b/src/test/resources/org/move/lang/parser/specs/conditions.txt index 9c7962f1c..02e6dc985 100644 --- a/src/test/resources/org/move/lang/parser/specs/conditions.txt +++ b/src/test/resources/org/move/lang/parser/specs/conditions.txt @@ -7,425 +7,638 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('sending') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - PsiElement(mut)('mut') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('signer') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('amount') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - PsiElement(local_kw)('local') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('sending') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('amount') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + PsiElement(mut)('mut') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvGlobalVariableStmtImpl(GLOBAL_VARIABLE_STMT) - PsiElement(global_kw)('global') + PsiElement(IDENTIFIER)('signer') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('amount') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + PsiElement(local_kw)('local') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) PsiElement(IDENTIFIER)('amount') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvGlobalVariableStmtImpl(GLOBAL_VARIABLE_STMT) + PsiElement(global_kw)('global') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('amount') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') + MvBinaryOpImpl(BINARY_OP) PsiElement(>)('>') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAxiomSpecExprImpl(AXIOM_SPEC_EXPR) - PsiElement(axiom_kw)('axiom') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAxiomSpecExprImpl(AXIOM_SPEC_EXPR) + PsiElement(axiom_kw)('axiom') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAxiomSpecExprImpl(AXIOM_SPEC_EXPR) - PsiElement(axiom_kw)('axiom') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') + MvBinaryOpImpl(BINARY_OP) PsiElement(>)('>') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAxiomSpecExprImpl(AXIOM_SPEC_EXPR) + PsiElement(axiom_kw)('axiom') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[<]) - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('global') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Counter') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('128') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(update_kw)('update') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[<]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvDotExprImpl(DOT_EXPR) MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('old') + PsiElement(IDENTIFIER)('global') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Counter') + PsiElement(>)('>') MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') MvValueArgumentImpl(VALUE_ARGUMENT) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') + PsiElement(IDENTIFIER)('a') PsiElement())(')') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<)('<') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement(update_kw)('update') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') PsiWhiteSpace(' ') - MvAssignmentExprImpl(ASSIGNMENT_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('expected_coin_sum') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('128') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + PsiElement(update_kw)('update') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[<]) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('old') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement())(')') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(<)('<') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + PsiElement(update_kw)('update') + PsiWhiteSpace(' ') + MvAssignmentExprImpl(ASSIGNMENT_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('expected_coin_sum') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[-]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('expected_coin_sum') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(-)('-') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('old') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement())(')') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvBinaryExprImpl(BINARY_EXPR[-]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('expected_coin_sum') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') + PsiElement(-)('-') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('global') - PsiElement(])(']') + PsiElement(IDENTIFIER)('old') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement())(')') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('global') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('global') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('isolated') - PsiElement(])(']') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('global') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('isolated') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('global') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('isolated') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('deactivated') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + PsiElement(update_kw)('update') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('global') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) + PsiElement(aborts_if_kw)('aborts_if') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) + PsiElement(aborts_if_kw)('aborts_if') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) + PsiElement(aborts_if_kw)('aborts_if') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace('\n ') + MvAbortsIfWithImpl(ABORTS_IF_WITH) + PsiElement(with_kw)('with') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + PsiElement(IDENTIFIER)('Error') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('MY_ERROR') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RET') PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('global') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('isolated') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('deactivated') - PsiElement(])(']') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[+]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') + PsiElement(+)('+') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - PsiElement(update_kw)('update') + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RET') PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('global') - PsiElement(])(']') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) + MvBinaryExprImpl(BINARY_EXPR[/]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) - PsiElement(aborts_if_kw)('aborts_if') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) + PsiElement(/)('/') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvBinaryExprImpl(BINARY_EXPR[/]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) - PsiElement(aborts_if_kw)('aborts_if') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) + PsiElement(/)('/') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) - PsiElement(aborts_if_kw)('aborts_if') PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RET') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RET') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvCodeBlockExprImpl(CODE_BLOCK_EXPR) + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('all') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLambdaExprImpl(LAMBDA_EXPR) + PsiElement(|)('|') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('z') + PsiElement(|)('|') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvBinaryExprImpl(BINARY_EXPR[+]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('z') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[&&]) MvBinaryExprImpl(BINARY_EXPR[==]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('RET') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(==)('==') PsiWhiteSpace(' ') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement([)('[') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') + PsiWhiteSpace(' ') + MvIndexExprImpl(INDEX_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace('\n ') - MvAbortsIfWithImpl(ABORTS_IF_WITH) - PsiElement(with_kw)('with') - PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('x') + PsiElement([)('[') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('3') + PsiElement(])(']') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==>]) + MvBinaryExprImpl(BINARY_EXPR[>]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Error') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('MY_ERROR') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[==]) MvRefExprImpl(REF_EXPR) @@ -435,67 +648,36 @@ FILE MvBinaryOpImpl(BINARY_OP) PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) + MvBinaryExprImpl(BINARY_EXPR[-]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') + PsiElement(-)('-') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==>]) MvBinaryExprImpl(BINARY_EXPR[==]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RET') + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[/]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - MvBinaryOpImpl(BINARY_OP) - PsiElement(/)('/') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvBinaryExprImpl(BINARY_EXPR[/]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - MvBinaryOpImpl(BINARY_OP) - PsiElement(/)('/') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RET') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[==]) MvRefExprImpl(REF_EXPR) @@ -505,623 +687,440 @@ FILE MvBinaryOpImpl(BINARY_OP) PsiElement(==)('==') PsiWhiteSpace(' ') - MvCodeBlockExprImpl(CODE_BLOCK_EXPR) - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('generic') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('all') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLambdaExprImpl(LAMBDA_EXPR) - PsiElement(|)('|') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('z') - PsiElement(|)('|') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvBinaryExprImpl(BINARY_EXPR[+]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('z') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Self') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('generic') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) + PsiElement(choose_kw)('choose') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiWhiteSpace(' ') + MvQuantWhereImpl(QUANT_WHERE) + PsiElement(where_kw)('where') PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RET') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement([)('[') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('exists') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement())(')') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(&&)('&&') PsiWhiteSpace(' ') - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement([)('[') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('3') - PsiElement(])(']') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==>]) MvBinaryExprImpl(BINARY_EXPR[>]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') + MvDotExprImpl(DOT_EXPR) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('global') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('R') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('a') + PsiElement())(')') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(>)('>') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('0') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) + PsiElement(choose_kw)('choose') + PsiWhiteSpace(' ') + PsiElement(min_kw)('min') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('i') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RET') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[-]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(-)('-') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('num') + PsiWhiteSpace(' ') + MvQuantWhereImpl(QUANT_WHERE) + PsiElement(where_kw)('where') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==>]) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('in_range') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('i') + PsiElement())(')') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(&&)('&&') PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('RET') + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('v') + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('i') + PsiElement(])(']') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(==)('==') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('generic') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Self') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('generic') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('T') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') + PsiWhiteSpace(' ') MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) PsiElement(choose_kw)('choose') PsiWhiteSpace(' ') + PsiElement(min_kw)('min') + PsiWhiteSpace(' ') MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiElement(:)(':') + PsiElement(IDENTIFIER)('i') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiWhiteSpace(' ') - MvQuantWhereImpl(QUANT_WHERE) - PsiElement(where_kw)('where') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[&&]) MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('exists') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('range') MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') MvValueArgumentImpl(VALUE_ARGUMENT) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') + PsiElement(IDENTIFIER)('gallery') PsiElement())(')') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>]) - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('global') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('R') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('a') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) - PsiElement(choose_kw)('choose') - PsiWhiteSpace(' ') - PsiElement(min_kw)('min') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('i') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') PsiWhiteSpace(' ') MvQuantWhereImpl(QUANT_WHERE) PsiElement(where_kw)('where') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('in_range') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('i') - PsiElement())(')') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) MvIndexExprImpl(INDEX_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('v') + PsiElement(IDENTIFIER)('gallery') PsiElement([)('[') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('i') PsiElement(])(']') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) - PsiElement(choose_kw)('choose') - PsiWhiteSpace(' ') - PsiElement(min_kw)('min') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('i') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('range') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('gallery') - PsiElement())(')') - PsiWhiteSpace(' ') - MvQuantWhereImpl(QUANT_WHERE) - PsiElement(where_kw)('where') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('id') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('gallery') - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('i') - PsiElement(])(']') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('id') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('id') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('find_token_index_by_id') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('TokenType') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) + PsiElement(choose_kw)('choose') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('i') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('range') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('id') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('find_token_index_by_id') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('TokenType') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') + PsiElement(IDENTIFIER)('gallery') + PsiElement())(')') PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') + MvQuantWhereImpl(QUANT_WHERE) + PsiElement(where_kw)('where') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) + MvIndexExprImpl(INDEX_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('gallery') + PsiElement([)('[') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('i') + PsiElement(])(']') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('id') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('id') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvSchemaImpl(SCHEMA) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(schema_kw)('schema') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ModuleInvariant') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('X') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) - PsiElement(choose_kw)('choose') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Y') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvRequiresSpecExprImpl(REQUIRES_SPEC_EXPR) + PsiElement(requires_kw)('requires') PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('i') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('range') + PsiElement(IDENTIFIER)('global') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('gallery') + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x0') PsiElement())(')') - PsiWhiteSpace(' ') - MvQuantWhereImpl(QUANT_WHERE) - PsiElement(where_kw)('where') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('f') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvIndexExprImpl(INDEX_EXPR) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('gallery') - PsiElement([)('[') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('i') - PsiElement(])(']') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('id') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvDotExprImpl(DOT_EXPR) + MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('id') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvSchemaImpl(SCHEMA) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(schema_kw)('schema') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ModuleInvariant') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('X') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Y') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvRequiresSpecExprImpl(REQUIRES_SPEC_EXPR) - PsiElement(requires_kw)('requires') + PsiElement(IDENTIFIER)('global') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x1') + PsiElement())(')') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('f') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvDotExprImpl(DOT_EXPR) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('global') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x0') + PsiElement())(')') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('f') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('global') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x0') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('f') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('global') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x1') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('f') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('global') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x0') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('f') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvDotExprImpl(DOT_EXPR) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('global') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('X') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - PsiElement(HEX_INTEGER_LITERAL)('0x1') - PsiElement())(')') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('f') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvDotExprImpl(DOT_EXPR) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('global') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('X') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + PsiElement(HEX_INTEGER_LITERAL)('0x1') + PsiElement())(')') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('f') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/forall_exists.txt b/src/test/resources/org/move/lang/parser/specs/forall_exists.txt index da3069f80..60a0ae7e4 100644 --- a/src/test/resources/org/move/lang/parser/specs/forall_exists.txt +++ b/src/test/resources/org/move/lang/parser/specs/forall_exists.txt @@ -7,186 +7,170 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('spec_call') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) - PsiElement(exists_kw)('exists') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('spec_call') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) + PsiElement(exists_kw)('exists') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('i') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('100') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('i') PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('i') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('100') - PsiElement(:)(':') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('i') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('3') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace('\n ') + MvForallQuantExprImpl(FORALL_QUANT_EXPR) + PsiElement(forall_kw)('forall') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr1') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('3') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace('\n ') - MvForallQuantExprImpl(FORALL_QUANT_EXPR) - PsiElement(forall_kw)('forall') + MvQuantWhereImpl(QUANT_WHERE) + PsiElement(where_kw)('where') PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr1') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiWhiteSpace(' ') - MvQuantWhereImpl(QUANT_WHERE) - PsiElement(where_kw)('where') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('old') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('exists') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('addr1') + PsiElement())(')') + PsiElement())(')') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace('\n ') + MvForallQuantExprImpl(FORALL_QUANT_EXPR) + PsiElement(forall_kw)('forall') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('old') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('exists') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('addr1') - PsiElement())(')') - PsiElement())(')') - PsiElement(:)(':') + PsiElement(IDENTIFIER)('num') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace('\n ') - MvForallQuantExprImpl(FORALL_QUANT_EXPR) - PsiElement(forall_kw)('forall') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiElement(,)(',') + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiElement(,)(',') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('num') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('z') + PsiElement(:)(':') PsiWhiteSpace(' ') - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('z') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('num') + PsiWhiteSpace('\n ') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==>]) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiWhiteSpace('\n ') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==>]) - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('z') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(&&)('&&') PsiWhiteSpace(' ') MvBinaryExprImpl(BINARY_EXPR[==]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') + PsiElement(IDENTIFIER)('y') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) PsiElement(==)('==') @@ -194,66 +178,101 @@ FILE MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('z') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('z') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace('\n ') + MvForallQuantExprImpl(FORALL_QUANT_EXPR) + PsiElement(forall_kw)('forall') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('num') PsiWhiteSpace('\n ') - MvForallQuantExprImpl(FORALL_QUANT_EXPR) - PsiElement(forall_kw)('forall') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) + PsiElement(exists_kw)('exists') PsiWhiteSpace(' ') MvQuantBindingsImpl(QUANT_BINDINGS) MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') + PsiElement(IDENTIFIER)('y') PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) PsiElement(IDENTIFIER)('num') - PsiWhiteSpace('\n ') + PsiWhiteSpace('\n ') PsiElement(:)(':') PsiWhiteSpace(' ') - MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) - PsiElement(exists_kw)('exists') + MvBinaryExprImpl(BINARY_EXPR[>=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiWhiteSpace('\n ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>=)('>=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace('\n ') + MvForallQuantExprImpl(FORALL_QUANT_EXPR) + PsiElement(forall_kw)('forall') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') PsiElement(:)(':') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[>=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>=)('>=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace('\n ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('num') + PsiWhiteSpace(' ') + MvQuantWhereImpl(QUANT_WHERE) + PsiElement(where_kw)('where') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(:)(':') + PsiWhiteSpace('\n ') MvForallQuantExprImpl(FORALL_QUANT_EXPR) PsiElement(forall_kw)('forall') PsiWhiteSpace(' ') MvQuantBindingsImpl(QUANT_BINDINGS) MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') + PsiElement(IDENTIFIER)('y') PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) @@ -264,214 +283,194 @@ FILE PsiElement(where_kw)('where') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') + PsiElement(BOOL_LITERAL)('false') PsiElement(:)(':') - PsiWhiteSpace('\n ') - MvForallQuantExprImpl(FORALL_QUANT_EXPR) - PsiElement(forall_kw)('forall') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiWhiteSpace(' ') - MvQuantWhereImpl(QUANT_WHERE) - PsiElement(where_kw)('where') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('false') - PsiElement(:)(':') - PsiWhiteSpace('\n ') - MvBinaryExprImpl(BINARY_EXPR[>=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>=)('>=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) - PsiElement(exists_kw)('exists') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('8') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('12') - PsiWhiteSpace(' ') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) + PsiWhiteSpace('\n ') + MvBinaryExprImpl(BINARY_EXPR[>=]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') + PsiElement(>=)('>=') PsiWhiteSpace(' ') MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) PsiElement(IDENTIFIER)('y') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) + PsiElement(exists_kw)('exists') PsiWhiteSpace(' ') - MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) - PsiElement(exists_kw)('exists') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') - PsiElement(,)(',') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('8') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('12') - PsiWhiteSpace(' ') - PsiElement(:)(':') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') + PsiElement(in_kw)('in') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('y') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('8') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('12') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==>]) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(==)('==') PsiWhiteSpace(' ') - MvParensExprImpl(PARENS_EXPR) - PsiElement(()('(') - MvForallQuantExprImpl(FORALL_QUANT_EXPR) - PsiElement(forall_kw)('forall') - PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('j') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('0') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('100') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) + PsiElement(exists_kw)('exists') PsiWhiteSpace(' ') - MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) - PsiElement(exists_kw)('exists') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - PsiElement(in_kw)('in') - PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(..)('..') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('10') + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('8') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('12') + PsiWhiteSpace(' ') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(:)(':') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('y') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==>]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('result') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvParensExprImpl(PARENS_EXPR) + PsiElement(()('(') + MvForallQuantExprImpl(FORALL_QUANT_EXPR) + PsiElement(forall_kw)('forall') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('j') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('0') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('100') + PsiElement(:)(':') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvExistsQuantExprImpl(EXISTS_QUANT_EXPR) + PsiElement(exists_kw)('exists') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvRangeQuantBindingImpl(RANGE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(in_kw)('in') + PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(..)('..') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('10') + PsiWhiteSpace(' ') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/pragma.txt b/src/test/resources/org/move/lang/parser/specs/pragma.txt index e50b2c66e..951691349 100644 --- a/src/test/resources/org/move/lang/parser/specs/pragma.txt +++ b/src/test/resources/org/move/lang/parser/specs/pragma.txt @@ -4,106 +4,105 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) - PsiElement(pragma_kw)('pragma') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) + PsiElement(pragma_kw)('pragma') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('verify') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) + PsiElement(pragma_kw)('pragma') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('verify') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('verify') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) - PsiElement(pragma_kw)('pragma') + PsiElement(=)('=') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('verify') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) - PsiElement(pragma_kw)('pragma') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) + PsiElement(pragma_kw)('pragma') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('verify') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('verify') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') + PsiElement(=)('=') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('timeout') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) - PsiElement(pragma_kw)('pragma') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('timeout') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) + PsiElement(pragma_kw)('pragma') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('verify') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('verify') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(,)(',') + PsiElement(=)('=') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('timeout') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('60') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) - PsiElement(pragma_kw)('pragma') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('timeout') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('friend') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('gg') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) - PsiElement(pragma_kw)('pragma') + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('60') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) + PsiElement(pragma_kw)('pragma') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('friend') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('gg') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvPragmaSpecStmtImpl(PRAGMA_SPEC_STMT) + PsiElement(pragma_kw)('pragma') + PsiWhiteSpace(' ') + MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) + PsiElement(IDENTIFIER)('friend') + PsiWhiteSpace(' ') + PsiElement(=)('=') PsiWhiteSpace(' ') - MvPragmaAttributeImpl(PRAGMA_ATTRIBUTE) - PsiElement(IDENTIFIER)('friend') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) MvPathImpl(PATH) - MvPathImpl(PATH) - MvPathAddressImpl(PATH_ADDRESS) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('m') + MvPathAddressImpl(PATH_ADDRESS) + PsiElement(DIEM_ADDRESS)('0x1') PsiElement(::)('::') - PsiElement(IDENTIFIER)('gg') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiElement(IDENTIFIER)('m') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('gg') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/scopes.txt b/src/test/resources/org/move/lang/parser/specs/scopes.txt index 8464058b4..f80caeb6e 100644 --- a/src/test/resources/org/move/lang/parser/specs/scopes.txt +++ b/src/test/resources/org/move/lang/parser/specs/scopes.txt @@ -4,359 +4,358 @@ FILE PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) - MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) PsiElement(spec)('spec') PsiWhiteSpace(' ') MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) PsiElement({)('{') PsiElement(})('}') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) - MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('all') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('bool') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) - MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) - PsiElement(fun)('fun') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvItemSpecBlockExprImpl(ITEM_SPEC_BLOCK_EXPR) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) + MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('all') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('uninterpreted') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('bool') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) + MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('uninterpreted') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + PsiComment(EOL_COMMENT)('// Native function which is defined in the prover's prelude.') + PsiWhiteSpace('\n ') + MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) + MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('serialize') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('MvValue') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('v') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - PsiComment(EOL_COMMENT)('// Native function which is defined in the prover's prelude.') - PsiWhiteSpace('\n ') - MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) - MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('serialize') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('MvValue') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('v') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MvValue') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('MyStruct') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('spec_is_valid') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr') - MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(IDENTIFIER)('MvValue') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('MyStruct') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('spec_is_valid') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiElement())(')') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('spec_uninterpreted') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecFunctionImpl(SPEC_FUNCTION) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(native)('native') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('spec_is_valid_native') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('addr') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('address') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('unpack') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('unpack') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('unpack') + MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) + MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) + PsiElement(()('(') PsiElement())(')') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('spec_uninterpreted') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('unpack') + MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) + MvItemSpecTypeParameterListImpl(ITEM_SPEC_TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvItemSpecTypeParameterImpl(ITEM_SPEC_TYPE_PARAMETER) + PsiElement(IDENTIFIER)('T') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvItemSpecTypeParameterImpl(ITEM_SPEC_TYPE_PARAMETER) + PsiElement(IDENTIFIER)('U') + PsiElement(>)('>') + MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr') + PsiElement())(')') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('unpack') + MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) + MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvItemSpecFunctionParameterImpl(ITEM_SPEC_FUNCTION_PARAMETER) + PsiElement(IDENTIFIER)('a') MvTypeAnnotationImpl(TYPE_ANNOTATION) PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecFunctionImpl(SPEC_FUNCTION) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('spec_is_valid_native') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('addr') + PsiElement(IDENTIFIER)('u8') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvItemSpecFunctionParameterImpl(ITEM_SPEC_FUNCTION_PARAMETER) + PsiElement(IDENTIFIER)('b') MvTypeAnnotationImpl(TYPE_ANNOTATION) PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('address') + PsiElement(IDENTIFIER)('u8') PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) PsiElement(IDENTIFIER)('unpack') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) + MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) PsiElement(()('(') PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvSchemaImpl(SCHEMA) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(schema_kw)('schema') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('ModuleInvariant') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('X') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('unpack') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('unpack') - MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) - MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('unpack') - MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) - MvItemSpecTypeParameterListImpl(ITEM_SPEC_TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvItemSpecTypeParameterImpl(ITEM_SPEC_TYPE_PARAMETER) - PsiElement(IDENTIFIER)('T') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvItemSpecTypeParameterImpl(ITEM_SPEC_TYPE_PARAMETER) - PsiElement(IDENTIFIER)('U') - PsiElement(>)('>') - MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('unpack') - MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) - MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvItemSpecFunctionParameterImpl(ITEM_SPEC_FUNCTION_PARAMETER) - PsiElement(IDENTIFIER)('a') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvItemSpecFunctionParameterImpl(ITEM_SPEC_FUNCTION_PARAMETER) - PsiElement(IDENTIFIER)('b') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement())(')') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('unpack') - MvItemSpecSignatureImpl(ITEM_SPEC_SIGNATURE) - MvItemSpecFunctionParameterListImpl(ITEM_SPEC_FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Y') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('supply') + MvTypeAnnotationImpl(TYPE_ANNOTATION) PsiElement(:)(':') PsiWhiteSpace(' ') MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvSchemaImpl(SCHEMA) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(schema_kw)('schema') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ModuleInvariant') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('X') - PsiElement(,)(',') + PsiElement(IDENTIFIER)('num') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + PsiElement(local_kw)('local') PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Y') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('supply') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - PsiElement(local_kw)('local') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('ensures') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('ensures') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('num') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('num') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/spec_properties.txt b/src/test/resources/org/move/lang/parser/specs/spec_properties.txt index 34a526dc9..11c114686 100644 --- a/src/test/resources/org/move/lang/parser/specs/spec_properties.txt +++ b/src/test/resources/org/move/lang/parser/specs/spec_properties.txt @@ -7,94 +7,93 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('spec_properties') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - PsiElement(])(']') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('seed') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(])(']') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) - PsiElement(invariant_kw)('invariant') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('abstract') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('concrete') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('verify') - PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement(])(']') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('seed') PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') + PsiElement(=)('=') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) PsiElement(invariant_kw)('invariant') PsiWhiteSpace(' ') MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) PsiElement([)('[') MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('seed') + PsiElement(IDENTIFIER)('abstract') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('concrete') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('verify') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') PsiElement(])(']') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvBinaryExprImpl(BINARY_EXPR[==]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvInvariantSpecExprImpl(INVARIANT_SPEC_EXPR) + PsiElement(invariant_kw)('invariant') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('seed') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/spec_statements.txt b/src/test/resources/org/move/lang/parser/specs/spec_statements.txt index 8486c183f..b1c50c675 100644 --- a/src/test/resources/org/move/lang/parser/specs/spec_statements.txt +++ b/src/test/resources/org/move/lang/parser/specs/spec_statements.txt @@ -7,717 +7,716 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('M') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') - PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('apply') - PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('apply') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('emits') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('emits') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('to') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('to') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('except') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiWhiteSpace(' ') + PsiErrorElement:'::', , '=' or '[' expected, got '==' + PsiElement(==)('==') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvItemSpecImpl(ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + MvItemSpecRefImpl(ITEM_SPEC_REF) + PsiElement(IDENTIFIER)('main') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + PsiElement(post_kw)('post') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('new_a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('except') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvLetStmtImpl(LET_STMT) + PsiElement(let)('let') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + MvInitializerImpl(INITIALIZER) + PsiElement(=)('=') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') - PsiWhiteSpace(' ') + MvRangeExprImpl(RANGE_EXPR) MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvExprStmtImpl(EXPR_STMT) + PsiElement(..)('..') + MvBinaryExprImpl(BINARY_EXPR[+]) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + MvBinaryOpImpl(BINARY_OP) + PsiElement(+)('+') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvBinaryExprImpl(BINARY_EXPR[==>]) MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiErrorElement:'::', , '=' or '[' expected, got '==' - PsiElement(==)('==') - PsiElement(>)('>') - PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvItemSpecImpl(ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - MvItemSpecRefImpl(ITEM_SPEC_REF) - PsiElement(IDENTIFIER)('main') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) + MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('inner_spec_fun') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEmitsSpecExprImpl(EMITS_SPEC_EXPR) + PsiElement(emits_kw)('emits') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('msg') PsiWhiteSpace(' ') - PsiElement(post_kw)('post') + PsiElement(to_kw)('to') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('new_a') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('handle') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvEmitsConditionImpl(EMITS_CONDITION) + PsiElement(if)('if') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvLetStmtImpl(LET_STMT) - PsiElement(let)('let') + MvBangExprImpl(BANG_EXPR) + PsiElement(!)('!') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('is_synthetic') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('a') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('concrete') + PsiElement(])(']') PsiWhiteSpace(' ') - MvInitializerImpl(INITIALIZER) - PsiElement(=)('=') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('result') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') - MvRangeExprImpl(RANGE_EXPR) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(..)('..') - MvBinaryExprImpl(BINARY_EXPR[+]) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - MvBinaryOpImpl(BINARY_OP) - PsiElement(+)('+') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvBinaryExprImpl(BINARY_EXPR[==>]) MvLitExprImpl(LIT_EXPR) PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('global') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('result') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(==)('==') PsiWhiteSpace(' ') MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) - MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('inner_spec_fun') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) + PsiElement(apply_kw)('apply') + PsiWhiteSpace(' ') + MvSchemaRefImpl(SCHEMA_REF) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('ModuleInvariant') + PsiWhiteSpace(' ') + MvApplyToImpl(APPLY_TO) + PsiElement(to_kw)('to') + PsiWhiteSpace(' ') + MvFunctionPatternImpl(FUNCTION_PATTERN) + PsiElement(FUNCTION_PATTERN_IDENT)('bar') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) + PsiElement(aborts_if_kw)('aborts_if') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('exists') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Window') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Signer') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('spec_address_of') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('to_limit') + PsiElement())(')') PsiElement())(')') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiElement(})('}') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEmitsSpecExprImpl(EMITS_SPEC_EXPR) - PsiElement(emits_kw)('emits') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('msg') - PsiWhiteSpace(' ') - PsiElement(to_kw)('to') - PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('handle') - PsiWhiteSpace(' ') - MvEmitsConditionImpl(EMITS_CONDITION) - PsiElement(if)('if') - PsiWhiteSpace(' ') - MvBangExprImpl(BANG_EXPR) - PsiElement(!)('!') - MvRefExprImpl(REF_EXPR) + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) + PsiElement(aborts_if_kw)('aborts_if') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('exists') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Window') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('is_synthetic') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('concrete') - PsiElement(])(']') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('global') - PsiElement(])(']') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvApplySchemaStmtImpl(APPLY_SCHEMA_STMT) - PsiElement(apply_kw)('apply') + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Signer') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('spec_address_of') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('to_limit') + PsiElement())(')') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsWithSpecExprImpl(ABORTS_WITH_SPEC_EXPR) + PsiElement(aborts_with_kw)('aborts_with') + PsiWhiteSpace(' ') + MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) + PsiElement([)('[') + MvSpecPropertyImpl(SPEC_PROPERTY) + PsiElement(IDENTIFIER)('check') + PsiElement(])(']') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvAbortsWithSpecExprImpl(ABORTS_WITH_SPEC_EXPR) + PsiElement(aborts_with_kw)('aborts_with') PsiWhiteSpace(' ') - MvSchemaRefImpl(SCHEMA_REF) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('ModuleInvariant') + PsiElement(IDENTIFIER)('error') + PsiElement(,)(',') PsiWhiteSpace(' ') - MvApplyToImpl(APPLY_TO) - PsiElement(to_kw)('to') - PsiWhiteSpace(' ') - MvFunctionPatternImpl(FUNCTION_PATTERN) - PsiElement(FUNCTION_PATTERN_IDENT)('bar') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) - PsiElement(aborts_if_kw)('aborts_if') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('exists') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Window') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Signer') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('spec_address_of') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('to_limit') - PsiElement())(')') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsIfSpecExprImpl(ABORTS_IF_SPEC_EXPR) - PsiElement(aborts_if_kw)('aborts_if') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('exists') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Window') - PsiElement(>)('>') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvCallExprImpl(CALL_EXPR) + PsiElement(IDENTIFIER)('Errors') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('NOT_PUBLISHED') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvCallExprImpl(CALL_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('exists') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Signer') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('spec_address_of') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('to_limit') - PsiElement())(')') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsWithSpecExprImpl(ABORTS_WITH_SPEC_EXPR) - PsiElement(aborts_with_kw)('aborts_with') - PsiWhiteSpace(' ') - MvSpecPropertyListImpl(SPEC_PROPERTY_LIST) - PsiElement([)('[') - MvSpecPropertyImpl(SPEC_PROPERTY) - PsiElement(IDENTIFIER)('check') - PsiElement(])(']') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvAbortsWithSpecExprImpl(ABORTS_WITH_SPEC_EXPR) - PsiElement(aborts_with_kw)('aborts_with') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(,)(',') - PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('CoinType') + PsiElement(>)('>') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvLitExprImpl(LIT_EXPR) + MvAddressLitImpl(ADDRESS_LIT) + PsiElement(@)('@') + MvAddressRefImpl(ADDRESS_REF) + PsiElement(DIEM_ADDRESS)('0x1') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSpecExprStmtImpl(SPEC_EXPR_STMT) + MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) + PsiElement(ensures_kw)('ensures') + PsiWhiteSpace(' ') + MvBinaryExprImpl(BINARY_EXPR[==]) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('error') - PsiElement(,)(',') + PsiElement(IDENTIFIER)('result') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Errors') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('NOT_PUBLISHED') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==)('==') PsiWhiteSpace(' ') MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('exists') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('CoinType') - PsiElement(>)('>') + PsiElement(IDENTIFIER)('TRACE') MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) PsiElement(()('(') MvValueArgumentImpl(VALUE_ARGUMENT) - MvLitExprImpl(LIT_EXPR) - MvAddressLitImpl(ADDRESS_LIT) - PsiElement(@)('@') - MvAddressRefImpl(ADDRESS_REF) - PsiElement(DIEM_ADDRESS)('0x1') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSpecExprStmtImpl(SPEC_EXPR_STMT) - MvEnsuresSpecExprImpl(ENSURES_SPEC_EXPR) - PsiElement(ensures_kw)('ensures') - PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[==]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('result') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==)('==') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('TRACE') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) - PsiElement(choose_kw)('choose') + MvChooseQuantExprImpl(CHOOSE_QUANT_EXPR) + PsiElement(choose_kw)('choose') + PsiWhiteSpace(' ') + MvQuantBindingsImpl(QUANT_BINDINGS) + MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('x') + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u64') + PsiWhiteSpace(' ') + MvQuantWhereImpl(QUANT_WHERE) + PsiElement(where_kw)('where') PsiWhiteSpace(' ') - MvQuantBindingsImpl(QUANT_BINDINGS) - MvTypeQuantBindingImpl(TYPE_QUANT_BINDING) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('x') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) + MvBinaryExprImpl(BINARY_EXPR[&&]) + MvBinaryExprImpl(BINARY_EXPR[>=]) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u64') - PsiWhiteSpace(' ') - MvQuantWhereImpl(QUANT_WHERE) - PsiElement(where_kw)('where') + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(>=)('>=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('4') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[&&]) - MvBinaryExprImpl(BINARY_EXPR[>=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(>=)('>=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('4') + MvBinaryExprImpl(BINARY_EXPR[<=]) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') + PsiElement(<=)('<=') PsiWhiteSpace(' ') - MvBinaryExprImpl(BINARY_EXPR[<=]) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(<=)('<=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('5') - PsiElement())(')') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) - PsiElement(IDENTIFIER)('amount') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MyType') - PsiElement(>)('>') - MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) - PsiElement(IDENTIFIER)('amount') - PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) - PsiElement({)('{') - PsiWhiteSpace(' ') - MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) - PsiElement(IDENTIFIER)('address') - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvCallExprImpl(CALL_EXPR) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('5') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) + PsiElement(IDENTIFIER)('amount') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('Signer') - PsiElement(::)('::') - PsiElement(IDENTIFIER)('address_of') - MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) - PsiElement(()('(') - MvValueArgumentImpl(VALUE_ARGUMENT) - MvRefExprImpl(REF_EXPR) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('acc') - PsiElement())(')') + PsiElement(IDENTIFIER)('MyType') + PsiElement(>)('>') + MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) + PsiElement(IDENTIFIER)('amount') + PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvSchemaIncludeItemImpl(SCHEMA_INCLUDE_ITEM) + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) + PsiElement({)('{') + PsiWhiteSpace(' ') + MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) + PsiElement(IDENTIFIER)('address') + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvImplyIncludeItemImpl(IMPLY_INCLUDE_ITEM) - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') - PsiWhiteSpace(' ') - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') - PsiWhiteSpace(' ') - MvImplyIncludeItemImpl(IMPLY_INCLUDE_ITEM) - MvBinaryExprImpl(BINARY_EXPR[!=]) - MvDotExprImpl(DOT_EXPR) - MvRefExprImpl(REF_EXPR) + MvCallExprImpl(CALL_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vote') - PsiElement(.)('.') - MvStructDotFieldImpl(STRUCT_DOT_FIELD) - PsiElement(IDENTIFIER)('agree') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(!=)('!=') + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('Signer') + PsiElement(::)('::') + PsiElement(IDENTIFIER)('address_of') + MvValueArgumentListImpl(VALUE_ARGUMENT_LIST) + PsiElement(()('(') + MvValueArgumentImpl(VALUE_ARGUMENT) + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('acc') + PsiElement())(')') PsiWhiteSpace(' ') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvImplyIncludeItemImpl(IMPLY_INCLUDE_ITEM) + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvImplyIncludeItemImpl(IMPLY_INCLUDE_ITEM) + MvBinaryExprImpl(BINARY_EXPR[!=]) + MvDotExprImpl(DOT_EXPR) MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('agree') + PsiElement(IDENTIFIER)('vote') + PsiElement(.)('.') + MvStructDotFieldImpl(STRUCT_DOT_FIELD) + PsiElement(IDENTIFIER)('agree') PsiWhiteSpace(' ') MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(!=)('!=') PsiWhiteSpace(' ') - MvSchemaLitImpl(SCHEMA_LIT) + MvRefExprImpl(REF_EXPR) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('CheckChangeVote') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('TokenT') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('ActionT') - PsiElement(>)('>') - MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) - PsiElement({)('{') - MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) - PsiElement(IDENTIFIER)('vote') + PsiElement(IDENTIFIER)('agree') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') + PsiWhiteSpace(' ') + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('CheckChangeVote') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('TokenT') PsiElement(,)(',') PsiWhiteSpace(' ') - MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) - PsiElement(IDENTIFIER)('proposer_address') - PsiElement(})('}') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('ActionT') + PsiElement(>)('>') + MvSchemaFieldsBlockImpl(SCHEMA_FIELDS_BLOCK) + PsiElement({)('{') + MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) + PsiElement(IDENTIFIER)('vote') + PsiElement(,)(',') + PsiWhiteSpace(' ') + MvSchemaLitFieldImpl(SCHEMA_LIT_FIELD) + PsiElement(IDENTIFIER)('proposer_address') + PsiElement(})('}') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvIfElseIncludeItemImpl(IF_ELSE_INCLUDE_ITEM) + PsiElement(if)('if') PsiWhiteSpace(' ') - MvIfElseIncludeItemImpl(IF_ELSE_INCLUDE_ITEM) - PsiElement(if)('if') - PsiWhiteSpace(' ') - MvConditionImpl(CONDITION) - PsiElement(()('(') - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiElement())(')') - PsiWhiteSpace(' ') - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - PsiWhiteSpace(' ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') + MvConditionImpl(CONDITION) + PsiElement(()('(') + MvLitExprImpl(LIT_EXPR) + PsiElement(BOOL_LITERAL)('true') + PsiElement())(')') PsiWhiteSpace(' ') - MvAndIncludeItemImpl(AND_INCLUDE_ITEM) - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(&&)('&&') - PsiWhiteSpace(' ') - MvSchemaLitImpl(SCHEMA_LIT) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) - MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) - PsiElement(native)('native') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('serialize') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('MoveValue') - PsiElement(>)('>') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - MvFunctionParameterImpl(FUNCTION_PARAMETER) - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('v') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvRefTypeImpl(REF_TYPE) - MvRefTypeStartImpl(REF_TYPE_START) - PsiElement(&)('&') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MoveValue') - PsiElement())(')') - MvReturnTypeImpl(RETURN_TYPE) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('vector') - MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) - PsiElement(<)('<') - MvTypeArgumentImpl(TYPE_ARGUMENT) - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(>)('>') - PsiElement(;)(';') - PsiWhiteSpace('\n\n ') - MvUpdateSpecStmtImpl(UPDATE_SPEC_STMT) - PsiElement(update_kw)('update') + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') PsiWhiteSpace(' ') - MvRefExprImpl(REF_EXPR) + PsiElement(else)('else') + PsiWhiteSpace(' ') + MvSchemaLitImpl(SCHEMA_LIT) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('supply') + PsiElement(IDENTIFIER)('MySchema') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvAndIncludeItemImpl(AND_INCLUDE_ITEM) + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') PsiWhiteSpace(' ') - PsiElement(=)('=') + MvBinaryOpImpl(BINARY_OP) + PsiElement(&&)('&&') PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvIncludeStmtImpl(INCLUDE_STMT) - PsiElement(include_kw)('include') + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + PsiElement(;)(';') + PsiWhiteSpace('\n\n ') + MvSpecInlineFunctionStmtImpl(SPEC_INLINE_FUNCTION_STMT) + MvSpecInlineFunctionImpl(SPEC_INLINE_FUNCTION) + PsiElement(native)('native') PsiWhiteSpace(' ') - MvImplyIncludeItemImpl(IMPLY_INCLUDE_ITEM) - MvLitExprImpl(LIT_EXPR) - PsiElement(BOOL_LITERAL)('true') - PsiWhiteSpace(' ') - MvBinaryOpImpl(BINARY_OP) - PsiElement(==>)('==>') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('serialize') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('MoveValue') + PsiElement(>)('>') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + MvFunctionParameterImpl(FUNCTION_PARAMETER) + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('v') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') + PsiWhiteSpace(' ') + MvRefTypeImpl(REF_TYPE) + MvRefTypeStartImpl(REF_TYPE_START) + PsiElement(&)('&') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MoveValue') + PsiElement())(')') + MvReturnTypeImpl(RETURN_TYPE) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvSchemaLitImpl(SCHEMA_LIT) + MvPathTypeImpl(PATH_TYPE) MvPathImpl(PATH) - PsiElement(IDENTIFIER)('MySchema') + PsiElement(IDENTIFIER)('vector') + MvTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + MvTypeArgumentImpl(TYPE_ARGUMENT) + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(>)('>') PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n\n ') - MvFunctionImpl(FUNCTION) - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('main2') - MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) - PsiElement(()('(') - PsiElement())(')') - PsiWhiteSpace(' ') - MvCodeBlockImpl(CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvExprStmtImpl(EXPR_STMT) + PsiWhiteSpace('\n\n ') + MvUpdateSpecStmtImpl(UPDATE_SPEC_STMT) + PsiElement(update_kw)('update') + PsiWhiteSpace(' ') + MvRefExprImpl(REF_EXPR) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('supply') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvIncludeStmtImpl(INCLUDE_STMT) + PsiElement(include_kw)('include') + PsiWhiteSpace(' ') + MvImplyIncludeItemImpl(IMPLY_INCLUDE_ITEM) MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') + PsiElement(BOOL_LITERAL)('true') + PsiWhiteSpace(' ') + MvBinaryOpImpl(BINARY_OP) + PsiElement(==>)('==>') PsiWhiteSpace(' ') - PsiErrorElement:'::', , '=' or '[' expected, got '==' - PsiElement(==)('==') - PsiElement(>)('>') + MvSchemaLitImpl(SCHEMA_LIT) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('MySchema') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n\n ') + MvFunctionImpl(FUNCTION) + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('main2') + MvFunctionParameterListImpl(FUNCTION_PARAMETER_LIST) + PsiElement(()('(') + PsiElement())(')') + PsiWhiteSpace(' ') + MvCodeBlockImpl(CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - MvExprStmtImpl(EXPR_STMT) - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('2') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + PsiErrorElement:'::', , '=' or '[' expected, got '==' + PsiElement(==)('==') + PsiElement(>)('>') + PsiWhiteSpace(' ') + MvExprStmtImpl(EXPR_STMT) + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('2') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file diff --git a/src/test/resources/org/move/lang/parser/specs/spec_variables.txt b/src/test/resources/org/move/lang/parser/specs/spec_variables.txt index 24542c660..dda0cb536 100644 --- a/src/test/resources/org/move/lang/parser/specs/spec_variables.txt +++ b/src/test/resources/org/move/lang/parser/specs/spec_variables.txt @@ -7,81 +7,80 @@ FILE PsiElement(::)('::') PsiElement(IDENTIFIER)('m') PsiWhiteSpace(' ') - MvModuleBlockImpl(MODULE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvModuleItemSpecImpl(MODULE_ITEM_SPEC) - PsiElement(spec)('spec') - PsiWhiteSpace(' ') - PsiElement(module)('module') - PsiWhiteSpace(' ') - MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) - PsiElement({)('{') - PsiWhiteSpace('\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - PsiElement(local_kw)('local') + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvModuleItemSpecImpl(MODULE_ITEM_SPEC) + PsiElement(spec)('spec') + PsiWhiteSpace(' ') + PsiElement(module)('module') + PsiWhiteSpace(' ') + MvSpecCodeBlockImpl(SPEC_CODE_BLOCK) + PsiElement({)('{') + PsiWhiteSpace('\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + PsiElement(local_kw)('local') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('two') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('two') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) - PsiElement(local_kw)('local') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvSchemaFieldStmtImpl(SCHEMA_FIELD_STMT) + PsiElement(local_kw)('local') + PsiWhiteSpace(' ') + MvBindingPatImpl(BINDING_PAT) + PsiElement(IDENTIFIER)('two_with_params') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - MvBindingPatImpl(BINDING_PAT) - PsiElement(IDENTIFIER)('two_with_params') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvGlobalVariableStmtImpl(GLOBAL_VARIABLE_STMT) - PsiElement(global_kw)('global') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvGlobalVariableStmtImpl(GLOBAL_VARIABLE_STMT) + PsiElement(global_kw)('global') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('three') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('three') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - MvGlobalVariableStmtImpl(GLOBAL_VARIABLE_STMT) - PsiElement(global_kw)('global') + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + MvGlobalVariableStmtImpl(GLOBAL_VARIABLE_STMT) + PsiElement(global_kw)('global') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('four') + MvTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('X') + PsiElement(,)(',') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('four') - MvTypeParameterListImpl(TYPE_PARAMETER_LIST) - PsiElement(<)('<') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('X') - PsiElement(,)(',') - PsiWhiteSpace(' ') - MvTypeParameterImpl(TYPE_PARAMETER) - PsiElement(IDENTIFIER)('Y') - PsiElement(>)('>') - MvTypeAnnotationImpl(TYPE_ANNOTATION) - PsiElement(:)(':') - PsiWhiteSpace(' ') - MvPathTypeImpl(PATH_TYPE) - MvPathImpl(PATH) - PsiElement(IDENTIFIER)('u8') + MvTypeParameterImpl(TYPE_PARAMETER) + PsiElement(IDENTIFIER)('Y') + PsiElement(>)('>') + MvTypeAnnotationImpl(TYPE_ANNOTATION) + PsiElement(:)(':') PsiWhiteSpace(' ') - PsiElement(=)('=') - PsiWhiteSpace(' ') - MvLitExprImpl(LIT_EXPR) - PsiElement(INTEGER_LITERAL)('1') - PsiElement(;)(';') - PsiWhiteSpace('\n ') - PsiElement(})('}') - PsiWhiteSpace('\n') - PsiElement(})('}') \ No newline at end of file + MvPathTypeImpl(PATH_TYPE) + MvPathImpl(PATH) + PsiElement(IDENTIFIER)('u8') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + MvLitExprImpl(LIT_EXPR) + PsiElement(INTEGER_LITERAL)('1') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + PsiElement(})('}') + PsiWhiteSpace('\n') + PsiElement(})('}') \ No newline at end of file