Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of a <see cref="Wilco.SyntaxHighlighting.Register"/> class.
 /// </summary>
 private Register()
 {
     this.highlighters = new HighlighterCollection();
     this.scanners     = new ScannerCollection();
     this.InitializeHighlighters();
     this.InitializeScanners(new CharTokenizer());
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of a <see cref="Wilco.SyntaxHighlighting.ScannerBase"/> class.
 /// </summary>
 /// <param name="tokenizer">The <see cref="Wilco.SyntaxHighlighting.TokenizerBase"/> which is used to tokenize the source code.</param>
 /// <param name="scannerResult">The <see cref="Wilco.SyntaxHighlighting.OccurrenceCollection"/> which will contain the scanner result.</param>
 public ScannerBase(TokenizerBase tokenizer, OccurrenceCollection scannerResult)
 {
     this.dependencies  = new ScannerCollection();
     this.enabled       = true;
     this.id            = "Unnamed";
     this.tokenizer     = tokenizer;
     this.scannerResult = scannerResult;
 }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of a <see cref="Wilco.SyntaxHighlighting.HighlighterBase"/> class.
        /// </summary>
        /// <param name="parser">The parser which will be used to parse the source code.</param>
        public HighlighterBase(IParser parser)
        {
            this.parser         = parser;
            this.tagValues      = new StringCollection();
            this.fileExtensions = new StringCollection();
            this.scanners       = new ScannerCollection();

            IScanner entryPointScanner = this.BuildEntryPointScanner(new CharTokenizer(), new OccurrenceCollection());

            if (entryPointScanner != null)
            {
                this.scanners.Add(entryPointScanner);
            }
        }