Lines Matching refs:TOK
26 enum TOK : ubyte
430 enum FirstCKeyword = TOK.inline;
435 foreach (idx, enumName; __traits(allMembers, TOK)) {
436 static if (idx != __traits(getMember, TOK, enumName)) {
437 pragma(msg, "Error: Expected TOK.", enumName, " to be ", idx, " but is ", __traits(getMember, TOK, enumName));
447 private immutable TOK[] keywords =
449 TOK.this_,
450 TOK.super_,
451 TOK.assert_,
452 TOK.null_,
453 TOK.true_,
454 TOK.false_,
455 TOK.cast_,
456 TOK.new_,
457 TOK.delete_,
458 TOK.throw_,
459 TOK.module_,
460 TOK.pragma_,
461 TOK.typeof_,
462 TOK.typeid_,
463 TOK.template_,
464 TOK.void_,
465 TOK.int8,
466 TOK.uns8,
467 TOK.int16,
468 TOK.uns16,
469 TOK.int32,
470 TOK.uns32,
471 TOK.int64,
472 TOK.uns64,
473 TOK.int128,
474 TOK.uns128,
475 TOK.float32,
476 TOK.float64,
477 TOK.float80,
478 TOK.bool_,
479 TOK.char_,
480 TOK.wchar_,
481 TOK.dchar_,
482 TOK.imaginary32,
483 TOK.imaginary64,
484 TOK.imaginary80,
485 TOK.complex32,
486 TOK.complex64,
487 TOK.complex80,
488 TOK.delegate_,
489 TOK.function_,
490 TOK.is_,
491 TOK.if_,
492 TOK.else_,
493 TOK.while_,
494 TOK.for_,
495 TOK.do_,
496 TOK.switch_,
497 TOK.case_,
498 TOK.default_,
499 TOK.break_,
500 TOK.continue_,
501 TOK.synchronized_,
502 TOK.return_,
503 TOK.goto_,
504 TOK.try_,
505 TOK.catch_,
506 TOK.finally_,
507 TOK.with_,
508 TOK.asm_,
509 TOK.foreach_,
510 TOK.foreach_reverse_,
511 TOK.scope_,
512 TOK.struct_,
513 TOK.class_,
514 TOK.interface_,
515 TOK.union_,
516 TOK.enum_,
517 TOK.import_,
518 TOK.mixin_,
519 TOK.static_,
520 TOK.final_,
521 TOK.const_,
522 TOK.alias_,
523 TOK.override_,
524 TOK.abstract_,
525 TOK.debug_,
526 TOK.deprecated_,
527 TOK.in_,
528 TOK.out_,
529 TOK.inout_,
530 TOK.lazy_,
531 TOK.auto_,
532 TOK.align_,
533 TOK.extern_,
534 TOK.private_,
535 TOK.package_,
536 TOK.protected_,
537 TOK.public_,
538 TOK.export_,
539 TOK.invariant_,
540 TOK.unittest_,
541 TOK.version_,
542 TOK.argumentTypes,
543 TOK.parameters,
544 TOK.ref_,
545 TOK.macro_,
546 TOK.pure_,
547 TOK.nothrow_,
548 TOK.gshared,
549 TOK.traits,
550 TOK.vector,
551 TOK.file,
552 TOK.fileFullPath,
553 TOK.line,
554 TOK.moduleString,
555 TOK.functionString,
556 TOK.prettyFunction,
557 TOK.shared_,
558 TOK.immutable_,
561 TOK.inline,
562 TOK.register,
563 TOK.restrict,
564 TOK.signed,
565 TOK.sizeof_,
566 TOK.typedef_,
567 TOK.unsigned,
568 TOK.volatile,
569 TOK._Alignas,
570 TOK._Alignof,
571 TOK._Atomic,
572 TOK._Bool,
573 TOK._Complex,
574 TOK._Generic,
575 TOK._Imaginary,
576 TOK._Noreturn,
577 TOK._Static_assert,
578 TOK._Thread_local,
581 TOK._import,
582 TOK.__cdecl,
583 TOK.__declspec,
584 TOK.__stdcall,
585 TOK.__attribute__,
603 static immutable TOK[TOK.max + 1] Ckeywords =
605 with (TOK)
607 TOK[TOK.max + 1] tab = identifier; // default to identifier
616 tab[kw] = cast(TOK) kw;
630 TOK value;
652 extern (D) private static immutable string[TOK.max + 1] tochars =
655 TOK.this_: "this",
656 TOK.super_: "super",
657 TOK.assert_: "assert",
658 TOK.null_: "null",
659 TOK.true_: "true",
660 TOK.false_: "false",
661 TOK.cast_: "cast",
662 TOK.new_: "new",
663 TOK.delete_: "delete",
664 TOK.throw_: "throw",
665 TOK.module_: "module",
666 TOK.pragma_: "pragma",
667 TOK.typeof_: "typeof",
668 TOK.typeid_: "typeid",
669 TOK.template_: "template",
670 TOK.void_: "void",
671 TOK.int8: "byte",
672 TOK.uns8: "ubyte",
673 TOK.int16: "short",
674 TOK.uns16: "ushort",
675 TOK.int32: "int",
676 TOK.uns32: "uint",
677 TOK.int64: "long",
678 TOK.uns64: "ulong",
679 TOK.int128: "cent",
680 TOK.uns128: "ucent",
681 TOK.float32: "float",
682 TOK.float64: "double",
683 TOK.float80: "real",
684 TOK.bool_: "bool",
685 TOK.char_: "char",
686 TOK.wchar_: "wchar",
687 TOK.dchar_: "dchar",
688 TOK.imaginary32: "ifloat",
689 TOK.imaginary64: "idouble",
690 TOK.imaginary80: "ireal",
691 TOK.complex32: "cfloat",
692 TOK.complex64: "cdouble",
693 TOK.complex80: "creal",
694 TOK.delegate_: "delegate",
695 TOK.function_: "function",
696 TOK.is_: "is",
697 TOK.if_: "if",
698 TOK.else_: "else",
699 TOK.while_: "while",
700 TOK.for_: "for",
701 TOK.do_: "do",
702 TOK.switch_: "switch",
703 TOK.case_: "case",
704 TOK.default_: "default",
705 TOK.break_: "break",
706 TOK.continue_: "continue",
707 TOK.synchronized_: "synchronized",
708 TOK.return_: "return",
709 TOK.goto_: "goto",
710 TOK.try_: "try",
711 TOK.catch_: "catch",
712 TOK.finally_: "finally",
713 TOK.with_: "with",
714 TOK.asm_: "asm",
715 TOK.foreach_: "foreach",
716 TOK.foreach_reverse_: "foreach_reverse",
717 TOK.scope_: "scope",
718 TOK.struct_: "struct",
719 TOK.class_: "class",
720 TOK.interface_: "interface",
721 TOK.union_: "union",
722 TOK.enum_: "enum",
723 TOK.import_: "import",
724 TOK.mixin_: "mixin",
725 TOK.static_: "static",
726 TOK.final_: "final",
727 TOK.const_: "const",
728 TOK.alias_: "alias",
729 TOK.override_: "override",
730 TOK.abstract_: "abstract",
731 TOK.debug_: "debug",
732 TOK.deprecated_: "deprecated",
733 TOK.in_: "in",
734 TOK.out_: "out",
735 TOK.inout_: "inout",
736 TOK.lazy_: "lazy",
737 TOK.auto_: "auto",
738 TOK.align_: "align",
739 TOK.extern_: "extern",
740 TOK.private_: "private",
741 TOK.package_: "package",
742 TOK.protected_: "protected",
743 TOK.public_: "public",
744 TOK.export_: "export",
745 TOK.invariant_: "invariant",
746 TOK.unittest_: "unittest",
747 TOK.version_: "version",
748 TOK.argumentTypes: "__argTypes",
749 TOK.parameters: "__parameters",
750 TOK.ref_: "ref",
751 TOK.macro_: "macro",
752 TOK.pure_: "pure",
753 TOK.nothrow_: "nothrow",
754 TOK.gshared: "__gshared",
755 TOK.traits: "__traits",
756 TOK.vector: "__vector",
757 TOK.file: "__FILE__",
758 TOK.fileFullPath: "__FILE_FULL_PATH__",
759 TOK.line: "__LINE__",
760 TOK.moduleString: "__MODULE__",
761 TOK.functionString: "__FUNCTION__",
762 TOK.prettyFunction: "__PRETTY_FUNCTION__",
763 TOK.shared_: "shared",
764 TOK.immutable_: "immutable",
766 TOK.endOfFile: "End of File",
767 TOK.leftCurly: "{",
768 TOK.rightCurly: "}",
769 TOK.leftParenthesis: "(",
770 TOK.rightParenthesis: ")",
771 TOK.leftBracket: "[",
772 TOK.rightBracket: "]",
773 TOK.semicolon: ";",
774 TOK.colon: ":",
775 TOK.comma: ",",
776 TOK.dot: ".",
777 TOK.xor: "^",
778 TOK.xorAssign: "^=",
779 TOK.assign: "=",
780 TOK.lessThan: "<",
781 TOK.greaterThan: ">",
782 TOK.lessOrEqual: "<=",
783 TOK.greaterOrEqual: ">=",
784 TOK.equal: "==",
785 TOK.notEqual: "!=",
786 TOK.not: "!",
787 TOK.leftShift: "<<",
788 TOK.rightShift: ">>",
789 TOK.unsignedRightShift: ">>>",
790 TOK.add: "+",
791 TOK.min: "-",
792 TOK.mul: "*",
793 TOK.div: "/",
794 TOK.mod: "%",
795 TOK.slice: "..",
796 TOK.dotDotDot: "...",
797 TOK.and: "&",
798 TOK.andAnd: "&&",
799 TOK.or: "|",
800 TOK.orOr: "||",
801 TOK.tilde: "~",
802 TOK.dollar: "$",
803 TOK.plusPlus: "++",
804 TOK.minusMinus: "--",
805 TOK.question: "?",
806 TOK.variable: "var",
807 TOK.addAssign: "+=",
808 TOK.minAssign: "-=",
809 TOK.mulAssign: "*=",
810 TOK.divAssign: "/=",
811 TOK.modAssign: "%=",
812 TOK.leftShiftAssign: "<<=",
813 TOK.rightShiftAssign: ">>=",
814 TOK.unsignedRightShiftAssign: ">>>=",
815 TOK.andAssign: "&=",
816 TOK.orAssign: "|=",
817 TOK.concatenateAssign: "~=",
818 TOK
819 TOK.notIdentity: "!is",
820 TOK.identifier: "identifier",
821 TOK.at: "@",
822 TOK.pow: "^^",
823 TOK.powAssign: "^^=",
824 TOK.goesTo: "=>",
825 TOK.pound: "#",
826 TOK.arrow: "->",
827 TOK.colonColon: "::",
830 TOK.error: "error",
831 TOK.string_: "string",
832 TOK.onScopeExit: "scope(exit)",
833 TOK.onScopeSuccess: "scope(success)",
834 TOK.onScopeFailure: "scope(failure)",
837 TOK.reserved: "reserved",
838 TOK.comment: "comment",
839 TOK.int32Literal: "int32v",
840 TOK.uns32Literal: "uns32v",
841 TOK.int64Literal: "int64v",
842 TOK.uns64Literal: "uns64v",
843 TOK.int128Literal: "int128v",
844 TOK.uns128Literal: "uns128v",
845 TOK.float32Literal: "float32v",
846 TOK.float64Literal: "float64v",
847 TOK.float80Literal: "float80v",
848 TOK.imaginary32Literal: "imaginary32v",
849 TOK.imaginary64Literal: "imaginary64v",
850 TOK.imaginary80Literal: "imaginary80v",
851 TOK.charLiteral: "charv",
852 TOK.wcharLiteral: "wcharv",
853 TOK.dcharLiteral: "dcharv",
854 TOK.wchar_tLiteral: "wchar_tv",
855 TOK.endOfLine: "\\n",
856 TOK.whitespace: "whitespace",
859 TOK.inline : "inline",
860 TOK.register : "register",
861 TOK.restrict : "restrict",
862 TOK.signed : "signed",
863 TOK.sizeof_ : "sizeof",
864 TOK.typedef_ : "typedef",
865 TOK.unsigned : "unsigned",
866 TOK.volatile : "volatile",
867 TOK._Alignas : "_Alignas",
868 TOK._Alignof : "_Alignof",
869 TOK._Atomic : "_Atomic",
870 TOK._Bool : "_Bool",
871 TOK._Complex : "_Complex",
872 TOK._Generic : "_Generic",
873 TOK._Imaginary: "_Imaginary",
874 TOK._Noreturn : "_Noreturn",
875 TOK._Static_assert : "_Static_assert",
876 TOK._Thread_local : "_Thread_local",
879 TOK._import : "__import",
880 TOK.__cdecl : "__cdecl",
881 TOK.__declspec : "__declspec",
882 TOK.__stdcall : "__stdcall",
883 TOK.__attribute__ : "__attribute__",
946 case TOK.int32Literal:
949 case TOK.uns32Literal:
950 case TOK.wchar_tLiteral:
953 case TOK.wcharLiteral:
954 case TOK.dcharLiteral:
955 case TOK.charLiteral:
963 case TOK.int64Literal:
966 case TOK.uns64Literal:
969 case TOK.float32Literal:
973 case TOK.float64Literal:
976 case TOK.float80Literal:
980 case TOK.imaginary32Literal:
984 case TOK.imaginary64Literal:
988 case TOK.imaginary80Literal:
992 case TOK.string_:
1009 case TOK.identifier:
1010 case TOK.enum_:
1011 case TOK.struct_:
1012 case TOK.import_:
1013 case TOK.wchar_:
1014 case TOK.dchar_:
1015 case TOK.bool_:
1016 case TOK.char_:
1017 case TOK.int8:
1018 case TOK.uns8:
1019 case TOK.int16:
1020 case TOK.uns16:
1021 case TOK.int32:
1022 case TOK.uns32:
1023 case TOK.int64:
1024 case TOK.uns64:
1025 case TOK.int128:
1026 case TOK.uns128:
1027 case TOK.float32:
1028 case TOK.float64:
1029 case TOK.float80:
1030 case TOK.imaginary32:
1031 case TOK.imaginary64:
1032 case TOK.imaginary80:
1033 case TOK.complex32:
1034 case TOK.complex64:
1035 case TOK.complex80:
1036 case TOK.void_:
1046 static const(char)* toChars(TOK value)
1051 extern (D) static string toString(TOK value) pure nothrow @nogc @safe