| /arkcompiler/ets_frontend/ets2panda/lexer/scripts/ |
| D | keywords.yaml | 26 token: KEYW_ABSTRACT 31 token: KEYW_ANY 35 token: KEYW_ANYREF 39 token: KEYW_ARGUMENTS 43 token: KEYW_AS 48 token: KEYW_ASSERT 52 token: KEYW_ASSERTS 56 token: KEYW_ASYNC 61 token: KEYW_AWAIT 66 token: KEYW_BIGINT [all …]
|
| /arkcompiler/runtime_core/assembler/ |
| D | assembly-context.h | 34 * Returns current value of a token 36 * sets the next token value 37 * returns current value of a token 39 * sets the next token value 40 * returns the next value of a token 44 std::string_view token; /* current token */ member 45 std::vector<panda::pandasm::Token> tokens; /* token list */ 48 Token::Type id = Token::Type::ID_BAD; /* current token type */ 49 …Token::Type signop = Token::Type::ID_BAD; /* current token operand type (if it is an operation) */ 57 void Make(const std::vector<panda::pandasm::Token> &t); [all …]
|
| D | lexer.cpp | 23 Token::Type FindDelim(char c) in FindDelim() 26 static const std::unordered_map<char, Token::Type> DELIM = {{',', Token::Type::DEL_COMMA}, in FindDelim() 27 {':', Token::Type::DEL_COLON}, in FindDelim() 28 {'{', Token::Type::DEL_BRACE_L}, in FindDelim() 29 {'}', Token::Type::DEL_BRACE_R}, in FindDelim() 30 {'(', Token::Type::DEL_BRACKET_L}, in FindDelim() 31 {')', Token::Type::DEL_BRACKET_R}, in FindDelim() 32 {'<', Token::Type::DEL_LT}, in FindDelim() 33 {'>', Token::Type::DEL_GT}, in FindDelim() 34 {'=', Token::Type::DEL_EQ}, in FindDelim() [all …]
|
| D | context.cpp | 22 void Context::Make(const std::vector<panda::pandasm::Token> &t) in Make() 34 …token = std::string_view(&*(tokens[number - 1].whole_line.begin() + tokens[number - 1].bound_left), in Make() 42 return token.size(); in Len() 47 if (token[0] == c) { in ValidateRegisterName() 48 std::string_view p = token; in ValidateRegisterName() 80 if (token[0] == 'a') { in ValidateParameterName() 81 std::string_view p = token; in ValidateParameterName() 95 return token; in GiveToken() 98 Token::Type Context::Next() in Next() 112 Token::Type Context::WaitFor() in WaitFor() [all …]
|
| D | lexer.h | 33 struct Token { struct 66 Token() : Token(0, 0, Type::ID_BAD, "") {} in Token() function 68 Token(size_t b_l, size_t b_r, Type t, std::string beg_of_line) in Token() function 74 using Tokens = std::pair<std::vector<Token>, Error>; 76 using TokenSet = const std::vector<std::vector<Token>>; 79 std::vector<Token> tokens; 111 Token::Type LexGetType(size_t beg, size_t end) const; 115 * Returns a string representation of a token type. 117 std::string_view TokenTypeWhat(Token::Type t);
|
| D | assembly-parser.cpp | 32 if (!open_ && *context_ == Token::Type::DEL_BRACE_L) { in ParseRecordFields() 50 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseRecordFields() 70 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseRecordFields() 124 while (*context_ == Token::Type::DEL_SQUARE_BRACKET_L) { in ParseType() 126 if (*context_ != Token::Type::DEL_SQUARE_BRACKET_R) { in ParseType() 179 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseRecordField() 220 void Parser::ParseAsArray(const std::vector<Token> &tokens) in ParseAsArray() 236 if (!open_ && *context_ == Token::Type::DEL_BRACE_L) { in ParseAsArray() 256 if (open_ && !context_.Mask() && *context_ != Token::Type::DEL_BRACE_R) { in ParseAsArray() 263 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseAsArray() [all …]
|
| /arkcompiler/runtime_core/assembler/utils/ |
| D | number-utils.h | 31 inline bool IsHexNumber(const std::string_view &token) in IsHexNumber() argument 33 for (auto i : token) { in IsHexNumber() 41 inline bool IsBinaryNumber(const std::string_view &token) in IsBinaryNumber() argument 43 for (auto i : token) { in IsBinaryNumber() 51 inline bool IsOctalNumber(const std::string_view &token) in IsOctalNumber() argument 53 for (auto i : token) { in IsOctalNumber() 65 std::string_view token = p; in ValidateInteger() local 67 if (token.back() == '-' || token.back() == '+' || token.back() == 'x' || token == ".") { in ValidateInteger() 71 if (token[0] == '-' || token[0] == '+') { in ValidateInteger() 72 token.remove_prefix(1); in ValidateInteger() [all …]
|
| /arkcompiler/runtime_core/static_core/assembler/utils/ |
| D | number-utils.h | 31 inline bool ValidateXToken(std::string_view token, size_t shift) in ValidateXToken() argument 33 token.remove_prefix(shift); in ValidateXToken() 35 for (auto i : token) { in ValidateXToken() 44 inline bool ValidateBToken(std::string_view token, size_t shift) in ValidateBToken() argument 46 token.remove_prefix(shift); in ValidateBToken() 47 if (token.empty()) { in ValidateBToken() 50 for (auto i : token) { in ValidateBToken() 59 inline bool ValidateZeroToTenToken(std::string_view token) in ValidateZeroToTenToken() argument 61 token.remove_prefix(1); in ValidateZeroToTenToken() 63 for (auto i : token) { in ValidateZeroToTenToken() [all …]
|
| /arkcompiler/runtime_core/static_core/assembler/ |
| D | assembly-context.h | 35 * Returns current value of a token 37 * sets the next token value 38 * returns current value of a token 40 * sets the next token value 41 * returns the next value of a token 45 std::string_view token; /* current token */ member 46 std::vector<ark::pandasm::Token> tokens; /* token list */ 49 Token::Type id = Token::Type::ID_BAD; /* current token type */ 50 … Token::Type signop = Token::Type::ID_BAD; /* current token operand type (if it is an operation) */ 58 void Make(const std::vector<ark::pandasm::Token> &t); [all …]
|
| D | lexer.cpp | 23 Token::Type FindDelim(char c) in FindDelim() 26 static const std::unordered_map<char, Token::Type> DELIM = {{',', Token::Type::DEL_COMMA}, in FindDelim() 27 {':', Token::Type::DEL_COLON}, in FindDelim() 28 {'{', Token::Type::DEL_BRACE_L}, in FindDelim() 29 {'}', Token::Type::DEL_BRACE_R}, in FindDelim() 30 {'(', Token::Type::DEL_BRACKET_L}, in FindDelim() 31 {')', Token::Type::DEL_BRACKET_R}, in FindDelim() 32 {'<', Token::Type::DEL_LT}, in FindDelim() 33 {'>', Token::Type::DEL_GT}, in FindDelim() 34 {'=', Token::Type::DEL_EQ}, in FindDelim() [all …]
|
| D | context.cpp | 22 void Context::Make(const std::vector<ark::pandasm::Token> &t) in Make() 34 … token = std::string_view(&*(tokens[number - 1].wholeLine.begin() + tokens[number - 1].boundLeft), in Make() 42 return token.size(); in Len() 47 std::string_view p = token; in ValidateFoundedRegisterName() 72 if (token[0] == c) { in ValidateRegisterName() 85 if (token[0] == 'a') { in ValidateParameterName() 86 std::string_view p = token; in ValidateParameterName() 100 return token; in GiveToken() 103 Token::Type Context::Next() in Next() 117 Token::Type Context::WaitFor() in WaitFor() [all …]
|
| D | lexer.h | 34 struct Token { struct 72 Token() : Token(0, 0, Type::ID_BAD, "") {} in Token() argument 74 Token(size_t bL, size_t bR, Type t, std::string begOfLine) in Token() function 80 using Tokens = std::pair<std::vector<Token>, Error>; 82 using TokenSet = const std::vector<std::vector<Token>>; 85 std::vector<Token> tokens; 119 Token::Type LexGetType(size_t beg, size_t end) const; 123 * Returns a string representation of a token type. 125 std::string_view TokenTypeWhat(Token::Type t);
|
| D | assembly-parser.cpp | 33 if (!open_ && *context_ == Token::Type::DEL_BRACE_L) { in ParseRecordFields() 51 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseRecordFields() 71 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseRecordFields() 125 while (*context_ == Token::Type::DEL_SQUARE_BRACKET_L) { in ParseType() 127 if (*context_ != Token::Type::DEL_SQUARE_BRACKET_R) { in ParseType() 180 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseRecordField() 217 void Parser::ParseAsArray(const std::vector<Token> &tokens) in ParseAsArray() 233 if (!open_ && *context_ == Token::Type::DEL_BRACE_L) { in ParseAsArray() 253 if (open_ && !context_.Mask() && *context_ != Token::Type::DEL_BRACE_R) { in ParseAsArray() 260 if (open_ && *context_ == Token::Type::DEL_BRACE_R) { in ParseAsArray() [all …]
|
| D | assembly-parser.h | 56 …* The main function of parsing, which takes a vector of token vectors and a name of the source fil… 91 Context context_; /* token iterator */ 204 void ParseAsCatchall(const std::vector<Token> &tokens); 205 …void ParseAsLanguage(const std::vector<Token> &tokens, bool &isLangParsed, bool &isFirstStatement); 206 void ParseAsRecord(const std::vector<Token> &tokens); 207 void ParseAsArray(const std::vector<Token> &tokens); 208 void ParseAsFunction(const std::vector<Token> &tokens); 209 void ParseAsUnionField(const std::vector<Token> &tokens); 210 void ParseAsBraceRight(const std::vector<Token> &tokens); 212 …void ParseContextByType(const std::vector<Token> &tokens, bool &isLangParsed, bool &isFirstStateme…
|
| /arkcompiler/ets_frontend/es2panda/lexer/token/ |
| D | token.cpp | 16 #include "token.h" 22 bool Token::IsAccessability() const in IsAccessability() 30 bool Token::IsAsyncModifier() const in IsAsyncModifier() 36 bool Token::IsStaticModifier() const in IsStaticModifier() 42 bool Token::IsDeclareModifier() const in IsDeclareModifier() 48 bool Token::IsReadonlyModifier() const in IsReadonlyModifier() 54 bool Token::IsAccessorModifier() const in IsAccessorModifier() 60 bool Token::IsUpdate() const in IsUpdate() 65 bool Token::IsUnary() const in IsUnary() 74 bool Token::IsPropNameLiteral() const in IsPropNameLiteral() [all …]
|
| D | token.h | 19 #include <lexer/token/sourceLocation.h> 20 #include <lexer/token/tokenType.h> 39 class Token { in DEFINE_BITOPS() 41 Token() = default; in DEFINE_BITOPS() 42 DEFAULT_COPY_SEMANTIC(Token); in DEFINE_BITOPS() 43 DEFAULT_MOVE_SEMANTIC(Token); in DEFINE_BITOPS() 44 ~Token() = default; in DEFINE_BITOPS()
|
| /arkcompiler/ets_frontend/ets2panda/lexer/token/ |
| D | token.h | 19 #include "lexer/token/sourceLocation.h" 20 #include "lexer/token/tokenType.h" 21 #include "lexer/token/number.h" 47 class Token { 49 Token() = default; 50 DEFAULT_COPY_SEMANTIC(Token); 51 DEFAULT_MOVE_SEMANTIC(Token); 52 ~Token() = default;
|
| D | token.cpp | 16 #include "token.h" 19 bool Token::IsAccessability() const in IsAccessability() 27 bool Token::IsAsyncModifier() const in IsAsyncModifier() 33 bool Token::IsForInOf() const in IsForInOf() 38 bool Token::IsStaticModifier() const in IsStaticModifier() 44 bool Token::IsDeclareModifier() const in IsDeclareModifier() 50 bool Token::IsReadonlyModifier() const in IsReadonlyModifier() 56 bool Token::IsUpdate() const in IsUpdate() 61 bool Token::IsUnary() const in IsUnary() 70 bool Token::IsPropNameLiteral() const in IsPropNameLiteral() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | FinalizationRegistry.sts | 118 * with token object - an object which can be used to remove 127 * @param token an object which can be used to remove 130 public register(object: Object, callbackArg: T, token?: Object): void { 133 if (token != null) { 134 refToken = new WeakRef<Object>(token); 142 * Removes all registered callbacks with the specific token value 144 * @param token all registered callbacks with this token will be removed 146 public unregister(token: Object): void { 150 if (refToken != null && refToken.deref() == token) { 215 …private setTrimplet(index: int, obj: WeakRef<Object> | null, cbArg: T | null, token: WeakRef<Objec… [all …]
|
| /arkcompiler/ets_frontend/ets2panda/lexer/templates/ |
| D | keywords.h.erb | 59 …=token_type_prefix + kw.token %>: Util().SetKeyword(Handle_<%=kw.name %>(Util(), "<%=kw.name %>", … 79 {"<%= kw.name%>", <%= token_type_prefix + kw.token %>}, 100 SetKeyword<Handle_<%=key%>>({"<%=key%>", <%= token_type_prefix + kw_desc.token%>}); 102 % token_type =kw_desc.token 106 …Keyword({"<%=key%>", <%=token_type_prefix + token_type%>, <%=token_type_prefix + kw_desc.token%>});
|
| /arkcompiler/ets_frontend/ets2panda/lexer/ |
| D | lexer.h | 21 #include "lexer/token/letters.h" 22 #include "lexer/token/token.h" 64 Token &GetToken() in GetToken() 69 const Token &GetToken() const in GetToken() 82 Token token_ {}; 115 Token &GetToken(); 116 const Token &GetToken() const; 121 auto token = GetToken(); in TryEatTokenType() local 122 if (token.Type() == type) { in TryEatTokenType() 129 std::optional<Token> TryEatTokenKeyword(lexer::TokenType type) in TryEatTokenKeyword() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/mdgen/include/ |
| D | mdlexer.h | 124 std::string strLine = ""; /* current token line */ 126 int32 intVal = 0; /* store integer when token */ 127 float floatVal = 0; /* store float value when token */ 128 MDTokenKind curKind = kMDInvalid; /* current token kind */
|
| /arkcompiler/runtime_core/compiler/optimizer/templates/ |
| D | instructions.rb | 94 @tokens.each do |token| 95 if IR::types.include?(token) 96 @types << token 99 resolved = TYPE_ALIASES[token] 104 @aux_types << token 129 raise "No cpp token for type #{t}" unless CPP_IR_TYPES.include?(t.to_s)
|
| /arkcompiler/runtime_core/static_core/compiler/optimizer/templates/ |
| D | instructions.rb | 94 @tokens.each do |token| 95 if IR::types.include?(token) 96 @types << token 99 resolved = TYPE_ALIASES[token] 104 @aux_types << token 129 raise "No cpp token for type #{t}" unless CPP_IR_TYPES.include?(t.to_s)
|
| /arkcompiler/runtime_core/static_core/assembler/tests/ |
| D | parser_test.cpp | 29 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 46 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 63 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 74 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 85 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 101 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 117 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 128 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 139 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() 159 std::vector<std::vector<ark::pandasm::Token>> v; in TEST() [all …]
|