Home | History | Annotate | Download | only in Format

Lines Matching refs:Keywords

201                                          const AdditionalKeywords &Keywords,
205 CurrentLines(&Lines), Style(Style), Keywords(Keywords), Tokens(nullptr),
367 NextTok->isOneOf(Keywords.kw_of, Keywords.kw_in)) ||
666 static bool mustBeJSIdent(const AdditionalKeywords &Keywords,
668 // FIXME: This returns true for C/C++ keywords like 'struct'.
671 !FormatTok->isOneOf(Keywords.kw_in, Keywords.kw_of, Keywords.kw_as,
672 Keywords.kw_async, Keywords.kw_await,
673 Keywords.kw_yield, Keywords.kw_finally,
674 Keywords.kw_function, Keywords.kw_import,
675 Keywords.kw_is, Keywords.kw_let, Keywords.kw_var,
676 Keywords.kw_abstract, Keywords.kw_extends,
677 Keywords.kw_implements, Keywords.kw_instanceof,
678 Keywords.kw_interface, Keywords.kw_throws));
681 static bool mustBeJSIdentOrValue(const AdditionalKeywords &Keywords,
683 return FormatTok->Tok.isLiteral() || mustBeJSIdent(Keywords, FormatTok);
688 static bool isJSDeclOrStmt(const AdditionalKeywords &Keywords,
691 tok::kw_return, Keywords.kw_yield,
699 tok::kw_throw, tok::kw_try, tok::kw_catch, Keywords.kw_finally,
701 tok::kw_const, tok::kw_class, Keywords.kw_var, Keywords.kw_let,
702 Keywords.kw_async, Keywords.kw_function,
704 Keywords.kw_import, tok::kw_export);
726 bool PreviousMustBeValue = mustBeJSIdentOrValue(Keywords, Previous);
736 bool NextMustBeValue = mustBeJSIdentOrValue(Keywords, Next);
741 if (PreviousMustBeValue && isJSDeclOrStmt(Keywords, Next))
885 if (FormatTok->is(Keywords.kw_import)) {
903 if (FormatTok->isOneOf(Keywords.kw_signals, Keywords.kw_qsignals,
904 Keywords.kw_slots, Keywords.kw_qslots)) {
944 if (FormatTok->isOneOf(Keywords.kw_NS_ENUM, Keywords.kw_NS_OPTIONS,
945 Keywords.kw_CF_ENUM, Keywords.kw_CF_OPTIONS))
971 // JavaScript only has pseudo keywords, all keywords are allowed to
1029 (FormatTok->is(Keywords.kw_function) ||
1030 FormatTok->startsSequence(Keywords.kw_async,
1031 Keywords.kw_function)) &&
1038 FormatTok->is(Keywords.kw_interface)) {
1047 if (Next && !mustBeJSIdent(Keywords, Next)) {
1218 assert(FormatTok->is(Keywords.kw_function) ||
1219 FormatTok->startsSequence(Keywords.kw_async, Keywords.kw_function));
1220 if (FormatTok->is(Keywords.kw_async))
1273 if (FormatTok->is(Keywords.kw_function) ||
1274 FormatTok->startsSequence(Keywords.kw_async, Keywords.kw_function)) {
1372 (FormatTok->is(Keywords.kw_function) ||
1373 FormatTok->startsSequence(Keywords.kw_async, Keywords.kw_function)))
1499 if (!(FormatTok->isOneOf(tok::kw_catch, Keywords.kw___except,
1503 FormatTok->is(Keywords.kw_finally)) ||
1676 if (FormatTok->isOneOf(Keywords.kw_slots, Keywords.kw_qslots))
1938 bool IsImport = FormatTok->is(Keywords.kw_import);
1949 if (FormatTok->is(Keywords.kw_async))
1951 if (FormatTok->is(Keywords.kw_function)) {