What does the term "@" mean in Razor syntax?
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 to share