[nem-en] Re: [svn] r7640: vs-plugin/trunk: Nemerle.Compiler.Utils/Nemerle.Compiler.Utils.csproj Nemerle.Compiler.Utils/...

Kamil Skalski kamil.skalski at gmail.com
Mon Apr 30 23:05:38 CEST 2007


Woo, what kind of creature is this? ;)  Just curious, what is the
reason for operating on System.Type instead of instances of Token and
using 'is' for checks?

2007/4/30, kliss <svnadmin at nemerle.org>:
> Log:
> Work on formatter.
>
> Author: kliss
> Date: Mon Apr 30 22:53:41 2007
> New Revision: 7640
>
> +      static GetCounterpartTokenType(t : Type) : Type
> +      {
> +      | bb when bb.Equals(typeof(Token.BeginBrace)) => typeof(Token.EndBrace);
> +      | bq when bq.Equals(typeof(Token.BeginQuote)) => typeof(Token.EndQuote);
> +      | br when br.Equals(typeof(Token.BeginRound)) => typeof(Token.EndRound);
> +      | bs when bs.Equals(typeof(Token.BeginSquare)) => typeof(Token.EndSquare);
> +
> +      | eb when eb.Equals(typeof(Token.EndBrace)) => typeof(Token.BeginBrace);
> +      | eq when eq.Equals(typeof(Token.EndQuote)) => typeof(Token.BeginQuote);
> +      | er when er.Equals(typeof(Token.EndRound)) => typeof(Token.BeginRound);
> +      | es when es.Equals(typeof(Token.EndSquare)) => typeof(Token.BeginSquare);
> +      | _ => null;
> +      }

-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list