Posted 15 years ago
by cowcow

In the Sql.langdef, I have the following ExplicitPatternGroup where TokenKey="Keyword"
<ExplicitPatternGroup TokenKey="Keyword" ClassificationTypeKey="SqlKeyword" LookAheadPattern="{NonWord}|\z">
<ExplicitPatterns><![CDATA[
ADD ALTER AS ASC AUTHORIZATION BACKUP BEGIN BREAK BROWSE BULK BY CASCADE CHECK CHECKPOINT CLOSE SELECT
]]></ExplicitPatterns>
</ExplicitPatternGroup>
I have initialize the language to the SyntaxEditor.
Using stream As Stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Sql.langdef")
If stream IsNot Nothing Then
Dim serializer As New SyntaxLanguageDefinitionSerializer()
serializer.InitializeFromStream(language, stream)
End If
End Using
Is it possible to get all the keywords from the object language?
e.g something like this
For each keyword in language.xxxx
......
next keyword
I would expect to get these keywords one by one, e.g: ADD ALTER AS
Is that possible?
Thanks,
Cow
[Modified at 05/16/2010 07:40 AM]
<ExplicitPatternGroup TokenKey="Keyword" ClassificationTypeKey="SqlKeyword" LookAheadPattern="{NonWord}|\z">
<ExplicitPatterns><![CDATA[
ADD ALTER AS ASC AUTHORIZATION BACKUP BEGIN BREAK BROWSE BULK BY CASCADE CHECK CHECKPOINT CLOSE SELECT
]]></ExplicitPatterns>
</ExplicitPatternGroup>
I have initialize the language to the SyntaxEditor.
Using stream As Stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Sql.langdef")
If stream IsNot Nothing Then
Dim serializer As New SyntaxLanguageDefinitionSerializer()
serializer.InitializeFromStream(language, stream)
End If
End Using
Is it possible to get all the keywords from the object language?
e.g something like this
For each keyword in language.xxxx
......
next keyword
I would expect to get these keywords one by one, e.g: ADD ALTER AS
Is that possible?
Thanks,
Cow
[Modified at 05/16/2010 07:40 AM]