ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Loosely follows the following grammar:
// terminator = ";" | "&" | "&;"
// literal = string | ansi_c_string | raw_string | expansion | simple_expansion | word
// concatenation = literal literal
// command = (concatenation | literal)+
//
// variable_name = word
// subscript = variable_name"["literal"]"
// assignment = (word | subscript)("=" | "+=")literal
// assignment_list = assignment+ command?
//
// statement =
// | "{" (statement terminator)+ "}"
// | "(" statements ")"
// | statement "||" statement
// | statement "&&" statement
// | statement "|" statement
// | statement "|&" statement
// | command
// | assignment_list
//
// statements = (statement terminator)* statement terminator?
// program = statements
export enum NodeType {
Program = 'program',
AssignmentList = 'assignment_list',
Assignment = 'assignment',
VariableName = 'variable_name',
Subscript
CompoundStatement
Subshell
Command
Pipeline
List
ProcessSubstitution
Concatenation
Word
String
Expansion
CommandSubstitution
RawString
AnsiCString
SimpleExpansion
SpecialExpansion
ArithmeticExpansion
BaseNodeNodeTypeString
BaseNodeNodeTypeAnsiCString
BaseNodeNodeTypeRawString
BaseNodeNodeTypeCommandSubstitution
BaseNodeNodeTypeConcatenation
BaseNodeNodeTypeExpansion
BaseNodeNodeTypeArithmeticExpansion
BaseNodeNodeTypeSimpleExpansion
BaseNodeNodeTypeSpecialExpansion
BaseNodeNodeTypeWord
text
innerText
startIndex
endIndex
complete
type Type
children BaseNode
type NodeTypeList
operator
type NodeTypeAssignmentList
children
AssignmentNode BaseNodeNodeTypeCommand
AssignmentNode
hasCommand
type NodeTypeAssignment
operator
name BaseNodeNodeTypeVariableName SubscriptNode
children LiteralNode
type NodeTypeSubscript
name BaseNodeNodeTypeVariableName
index LiteralNode
operators
operators
parseOperator str index Operator
c strindex
c
op strindex index
operatorsop Operator
op Operator
c Operator
getInnerText node BaseNode
children type complete text node
type NodeTypeConcatenation
childrencurrent child current childinnerText
terminalCharsMapping key
NodeTypeString
NodeTypeRawString
NodeTypeAnsiCString
terminalChars terminalCharsMappingtype
startChars terminalChars
endChars complete terminalChars
innerText
i startCharslength i textlength endCharslength i
c texti
isWordEscape c type NodeTypeWord
isStringEscape
c
type NodeTypeString
texti
isWordEscape isStringEscape
i
innerText texti
innerText
createNode BaseNode
str
partial Partial
node
startIndex
type NodeTypeWord
endIndex strlength
text
innerText
complete
children
partial
BaseNode
text strnodestartIndex nodeendIndex
innerText node text
node text innerText
createTextNode
str
startIndex
text
BaseNode
str startIndex text endIndex startIndex textlength
str index
firstChar strindex
firstChar
index firstChar
parseSimpleExpansion
str
index
terminalChars
BaseNodeNodeTypeSimpleExpansion
BaseNodeNodeTypeSpecialExpansion
node PartialBaseNodeNodeTypeSimpleExpansion
startIndex index
type NodeTypeSimpleExpansion
strlength index strindex
str
node
type NodeTypeSpecialExpansion
endIndex index
terminalSymbols terminalChars
i index
i strlength i
terminalSymbolsstri
i index
str
node
endIndex i
str
node
endIndex i
str
startIndex
terminalChar
BaseNodeNodeTypeCommandSubstitution
index
strstartIndex startIndex startIndex
statements children terminatorIndex
str
index
terminalChar
terminated terminatorIndex
str
startIndex
type NodeTypeCommandSubstitution
complete terminated childrenlength
endIndex terminated terminatorIndex strlength
children
parseString NodeTypeString
parseRawString
NodeTypeRawString
parseExpansion
NodeTypeExpansion
parseAnsiCString
NodeTypeAnsiCString
parseArithmeticExpansion
NodeTypeArithmeticExpansion
str
index
inString
terminators
LiteralNode
lookahead
strindex
strindex
strindex
lookahead
lookahead
lookahead
str index
str index
lookahead
str index
inString lookahead
str index
str index terminators
str index
inString str index
inString str index
type
startChars
endChars
canHaveChildren
type NodeTypeExpansion type NodeTypeString
isString type NodeTypeString
str startIndex BaseNode
children
i startIndex startCharslength i strlength i
child canHaveChildren
str i isString endChars
child
childrenchild
i childendIndex
stri type NodeTypeRawString
i
stri i endCharslength endChars
str
startIndex
type
children
endIndex i endCharslength
str
startIndex
type
children
complete
str
index
terminalChar
mustTerminate
statements BaseNode
terminatorIndex
statements
i index
i strlength
statement str i mustTerminate terminalChar
opIndex str statementendIndex
reachedEnd opIndex
mustTerminate reachedEnd terminalChar stropIndex
statementsstatement
statements terminatorIndex opIndex
reachedEnd
statementsstatement
op reachedEnd str opIndex
op
i opIndex oplength
nextIndex str i
statementsstatement
nextIndex strnextIndex terminalChar
statements terminatorIndex nextIndex
statement str
statement
complete
statementtype NodeTypeAssignmentList
statementcomplete
statementsstatement
i opIndex
statements terminatorIndex
parseConcatenationOrLiteralNode
str
startIndex
terminalChar
children LiteralNode endIndex
children LiteralNode
argumentChildren LiteralNode
wordStart
endIndex
wordStart
word str
startIndex wordStart
endIndex
argumentChildrenword
wordStart
endIndex
endIndex
argument argumentChildren
argumentChildrenlength
finalPart argumentChildrenargumentChildrenlength
argument str
startIndex argumentChildrenstartIndex
type NodeTypeConcatenation
endIndex finalPartendIndex
complete finalPartcomplete
children argumentChildren
argument
childrenargument
argumentChildren
terminators
terminalChar
terminatorsterminalChar
i startIndex
i strlength i
c stri
op str i
op c terminalChar
childNode str i terminators
childNode
i
argumentChildrenchildNode
i childNodeendIndex
c
i
c
i
wordStart
wordStart i
i
children endIndex i
str
idx
terminalChar
BaseNodeNodeTypeCommand
startIndex Mathstr idx idx
children endIndex
str
startIndex
terminalChar
str
startIndex
type NodeTypeCommand
complete childrenlength
endIndex childrenlength endIndex strlength
children
parseAssignmentNode
str
startIndex
AssignmentNode
equalsIndex str startIndex
operator strequalsIndex
firstOperatorCharIndex
operator equalsIndex equalsIndex
firstSquareBracketIndex str
startIndex firstOperatorCharIndex
nameNode SubscriptNode BaseNodeNodeTypeVariableName
variableName str
type NodeTypeVariableName
startIndex
endIndex
firstSquareBracketIndex
firstSquareBracketIndex
firstOperatorCharIndex
firstSquareBracketIndex
index str
type NodeTypeWord
startIndex firstSquareBracketIndex
endIndex firstOperatorCharIndex
nameNode str
type NodeTypeSubscript
name variableName
startIndex
endIndex indexendIndex
children index
nameNode variableName
children endIndex
str
equalsIndex
str
name nameNode
startIndex
endIndex
type NodeTypeAssignment
operator
children
complete childrenchildrenlength complete
parseAssignments str index AssignmentNode
variables AssignmentNode
lastVariableEnd index
lastVariableEnd strlength
nextTokenStart str lastVariableEnd
strnextTokenStart
assignmentNode str nextTokenStart
variablesassignmentNode
lastVariableEnd assignmentNodeendIndex
variables
variables
parseAssignmentListNodeOrCommandNode
str
startIndex
terminalChar
AssignmentListNode BaseNodeNodeTypeCommand
assignments str startIndex
assignmentslength
lastAssignment assignmentsassignmentslength
operator
str
str lastAssignmentendIndex
command BaseNodeNodeTypeCommand
operator
lastAssignmentcomplete
lastAssignmentendIndex strlength
command str lastAssignmentendIndex terminalChar
str
type NodeTypeAssignmentList
startIndex
endIndex command commandendIndex lastAssignmentendIndex
hasCommand command
children command assignments command assignments
str startIndex terminalChar
reduceStatements
str
lhs BaseNode
rhs BaseNode
type NodeType
BaseNode
str
type
startIndex lhsstartIndex
children rhstype type lhs rhschildren lhs rhs
endIndex rhsendIndex
complete lhscomplete rhscomplete
str
index
terminalChar
BaseNode
i str index
i i index i
statement
stri
isCompound stri
endChar isCompound
statements children terminatorIndex
str
i
endChar
isCompound
hasChildren childrenlength
terminated terminatorIndex
endIndex terminatorIndex
terminated
endIndex hasChildren
childrenchildrenlength endIndex
strlength
statement str
startIndex i
type isCompound NodeTypeCompoundStatement NodeTypeSubshell
endIndex
complete terminated hasChildren
children
statement str i terminalChar
i statementendIndex
opIndex str i
op opIndex str opIndex
op
op
op
op
opIndex terminalChar stropIndex terminalChar
statement
rightHandStatement
str
opIndex oplength
terminalChar
op op
str statement rightHandStatement NodeTypeList
op op
rightHandStatementtype NodeTypeList
oldFirstChild otherChildren rightHandStatementchildren
newFirstChild
str
statement
oldFirstChild
NodeTypePipeline
str
type NodeTypeList
startIndex newFirstChildstartIndex
children newFirstChild otherChildren
endIndex rightHandStatementendIndex
complete newFirstChildcomplete rightHandStatementcomplete
str
statement
rightHandStatement
NodeTypePipeline
statement
root BaseNode
node BaseNode level
indent level
nodeText
childrenText nodechildren
child child level
childrenText
nodeText
nodecomplete
nodeText
nodeText
root
parse str BaseNode
str
startIndex
type NodeTypeProgram
children str statements