Posted 19 years ago
by Russell Mason
Hi
I have a language file that starts:
<SyntaxLanguage Key="MyLanguage" LanguageDefinitionVersion="3.0"
Secure="True" WordContainsAdditionalCharacters="@_"
TokenIDTypeName="MyNamespace.MyTokenIDs, MyAssembly"
xmlns="http://ActiproSoftware/SyntaxEditor/3.0/LanguageDefinition">
...
and an enum that starts:
namespace MyNamespace
{
public enum MyTokenIDs
{
DefaultToken,
WhitespaceToken,
...
but I keep getting the exception:
The language 'MyLanguage' has a TokenIDTypeName however the lexical state 'DefaultState' contains a token 'DefaultToken' and no integer constant on the 'MyNamespace.MyTokenIDs' class could be found with the name 'DefaultToken'.
I know its loading the type because if I change the Type name I get a different 'can't load type' error.
I've tried using a public class with public const int DefaultToken = 1; etc but that gives the same error.
Any ideas as to what I've missed
Thanks
Russell Mason
I have a language file that starts:
<SyntaxLanguage Key="MyLanguage" LanguageDefinitionVersion="3.0"
Secure="True" WordContainsAdditionalCharacters="@_"
TokenIDTypeName="MyNamespace.MyTokenIDs, MyAssembly"
xmlns="http://ActiproSoftware/SyntaxEditor/3.0/LanguageDefinition">
...
and an enum that starts:
namespace MyNamespace
{
public enum MyTokenIDs
{
DefaultToken,
WhitespaceToken,
...
but I keep getting the exception:
The language 'MyLanguage' has a TokenIDTypeName however the lexical state 'DefaultState' contains a token 'DefaultToken' and no integer constant on the 'MyNamespace.MyTokenIDs' class could be found with the name 'DefaultToken'.
I know its loading the type because if I change the Type name I get a different 'can't load type' error.
I've tried using a public class with public const int DefaultToken = 1; etc but that gives the same error.
Any ideas as to what I've missed
Thanks
Russell Mason