Hello Chuck,
why I can't see the following words in KeywordSpecs.cobra: 'abstract', 'and' (from "and ensure"), 'assembly', 'ct_trace', 'fake', 'internal', 'new', 'nonvirtual', 'or' (from "or require"), 'partial', 'private', 'protected', 'public' and numeric types like 'int32', 'uint16' ... ?
Forums
Something missing?
2 posts
• Page 1 of 1
Re: Something missing?
Some words like "protected" and "partial" are simply done through string matches. In other words, those words come in as identifiers and the parser checks for them. However, I'm planning on changing them to real keywords.
"assembly" will remain a virtual keyword. It's only used for declaring assembly level attributes and its a common enough name for parameters and local vars when working with instances of Assembly.
The integer types with explicit sizes are identified via a regex such as int[0-9]+ which is then checked for a valid value of (8, 16, 32, 64). Maybe those should be added, but marked as "documentation only" so the tokenizer doesn't pick them up?
I've added a group+explanation for "and" and "or" with respect to contracts.
Finally, I plan to enhance CommandLine.cobra to spit this information out via a -keywords argument, but I don't want to make that enhancement until I've applied an outstanding patch to CommandLine.cobra.
Thanks for the questions,
-Chuck
"assembly" will remain a virtual keyword. It's only used for declaring assembly level attributes and its a common enough name for parameters and local vars when working with instances of Assembly.
The integer types with explicit sizes are identified via a regex such as int[0-9]+ which is then checked for a valid value of (8, 16, 32, 64). Maybe those should be added, but marked as "documentation only" so the tokenizer doesn't pick them up?
I've added a group+explanation for "and" and "or" with respect to contracts.
Finally, I plan to enhance CommandLine.cobra to spit this information out via a -keywords argument, but I don't want to make that enhancement until I've applied an outstanding patch to CommandLine.cobra.
Thanks for the questions,
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 139 guests