Syntax.Commnad

Overview

It is an XML based file that allows the IDE check syntax error, provide auto-completion, and fill in the description in auto-completion window.

Syntax

<Command>
    <Name>Command Name</Name>
    <Description>Description that shows in the auto-completion window</Description>
    <Usage>Usage description that shows in the auto-completion window</Usage>
    <Syntax>Regular expression used for syntax check the extract code form raw text</Syntax>
  </Command>


Example

  <Command>
    <Name>copy</Name>
    <Description>Set rX = rY</Description>
    <Usage>copy rX, rY</Usage>
    <Syntax>\d{1,}\s{1,}copy\s{1,}r\d{1,2}((\s*,\s*)|(\s{1,}))r\d{1,2}</Syntax>
  </Command>

Resource Loading Mechanism

This file is compiled as embedded resource. Thus, when the main window is loading, all the commands will be loaded into three different static dictionary.

You can load the files by call Load() from Syntax.SyntaxManager
SyntaxManager.Load();

Last edited Mar 27, 2014 at 8:56 PM by Kuree, version 2