Skip to content

Example

mjehrhart edited this page Apr 5, 2022 · 3 revisions

Passed in the text below (via file path -> lexical_scanner::lexer(file_path)

use std::ops::Deref;
 
#[allow(
    dead_code,
    clippy::upper_case_acronyms,
    clippy::enum_variant_names,
    non_camel_case_types
)]

impl Deref for Token {
    type Target = Token;

    fn deref(&self) -> &Self::Target {
        &self
    }
}

Results

  1. KW_Use
  2. WhiteSpace
  3. Word("std")
  4. PathSep
  5. Word("ops")
  6. PathSep
  7. Word("Deref")
  8. Semi
  9. Newline
  10. Newline
  11. Pound
  12. BracketLeft
  13. Word("allow")
  14. ParenLeft
  15. Newline
  16. WhiteSpace
  17. WhiteSpace
  18. WhiteSpace
  19. WhiteSpace
  20. Word("dead_code")
  21. Comma
  22. Newline
  23. WhiteSpace
  24. WhiteSpace
  25. WhiteSpace
  26. WhiteSpace
  27. Word("clippy")
  28. PathSep
  29. Word("upper_case_acronyms")
  30. Comma
  31. Newline
  32. WhiteSpace
  33. WhiteSpace
  34. WhiteSpace
  35. WhiteSpace
  36. Word("clippy")
  37. PathSep
  38. Word("enum_variant_names")
  39. Comma
  40. Newline
  41. WhiteSpace
  42. WhiteSpace
  43. WhiteSpace
  44. WhiteSpace
  45. Word("non_camel_case_types")
  46. Newline
  47. ParenRight
  48. BracketRight
  49. Newline
  50. Newline
  51. KW_Impl
  52. WhiteSpace
  53. Word("Deref")
  54. WhiteSpace
  55. KW_For
  56. WhiteSpace
  57. Word("Token")
  58. WhiteSpace
  59. CurlyBraceLeft
  60. Newline
  61. WhiteSpace
  62. WhiteSpace
  63. WhiteSpace
  64. WhiteSpace
  65. KW_Type
  66. WhiteSpace
  67. Word("Target")
  68. WhiteSpace
  69. Eq
  70. WhiteSpace
  71. Word("Token")
  72. Semi
  73. Newline
  74. Newline
  75. WhiteSpace
  76. WhiteSpace
  77. WhiteSpace
  78. WhiteSpace
  79. KW_Fn
  80. WhiteSpace
  81. Word("deref")
  82. ParenLeft
  83. And
  84. KW_Self
  85. ParenRight
  86. WhiteSpace
  87. RArrow
  88. WhiteSpace
  89. And
  90. KW_SELF
  91. PathSep
  92. Word("Target")
  93. WhiteSpace
  94. CurlyBraceLeft
  95. Newline
  96. WhiteSpace
  97. WhiteSpace
  98. WhiteSpace
  99. WhiteSpace
  100. WhiteSpace
  101. WhiteSpace
  102. WhiteSpace
  103. WhiteSpace
  104. And
  105. KW_Self
  106. Newline
  107. WhiteSpace
  108. WhiteSpace
  109. WhiteSpace
  110. WhiteSpace
  111. CurlyBraceRight
  112. Newline
  113. CurlyBraceRight
  114. Newline
Clone this wiki locally