byte|char8|char16|char32|decimal|double|float|int|int8|int16|int32|int64|long|object|sbyte|short|string|uint|uint8|uint16|uint32|uint64|uint|let|var)\b\??">
        <token type="KeywordType"/>
      </rule>
      <rule pattern="(true|false|null)\b">
        <token type="KeywordConstant"/>
      </rule>
      <rule pattern="(class|struct|record|interface)(\s+)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
        </bygroups>
        <push state="class"/>
      </rule>
      <rule pattern="(namespace|using)(\s+)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
        </bygroups>
        <push state="namespace"/>
      </rule>
      <rule pattern="@?[_a-zA-Z]\w*">
        <token type="Name"/>
      </rule>
    </state>
    <state name="class">
      <rule pattern="@?[_a-zA-Z]\w*">
        <token type="NameClass"/>
        <pop depth="1"/>
      </rule>
      <rule>
        <pop depth="1"/>
      </rule>
    </state>
    <state name="namespace">
      <rule pattern="(?=\()">
        <token type="Text"/>
        <pop depth="1"/>
      </rule>
      <rule pattern="(@?[_a-zA-Z]\w*|\.)+">
        <token type="NameNamespace"/>
        <pop depth="1"/>
      </rule>
    </state>
  </rules>
</lexer>