What does the term "@" mean in Razor syntax?

The stuff I've read usually uses phrases like "use the @ symbol here to indicate the beginning ...", but I want to know how to name such a character. A coworker suggested the word "token" but I don't think it is correct.

+3


source to share


1 answer


Looking briefly at the source code, the Razor team seems to refer to it as a Jump Symbol .

In SyntaxConstants :

namespace System.Web.Razor.Parser
{
    public static class SyntaxConstants
    {
        public static readonly char TransitionCharacter = '@';
        public static readonly string TransitionString = "@";
    }
}

      



Also in HtmlSymbolType.Transition :

namespace System.Web.Razor.Tokenizer.Symbols
{
    public enum HtmlSymbolType
    {
        ...
        Transition, // @
    }
} 

      

However, I doubt you can officially call it "Transition", it is more like a parser's internal term to denote context switches (like HTML to C # and vice versa).

+5


source







All Articles