Ejemplo n.º 1
0
        private void DoSyntaxImport(Match m)
        {
            if (!this.IsProcessingTokens)
            {
                return;
            }

            string        syntaxId      = m.Groups["syntaxId"].Value;
            string        targetCluster = m.Groups["targetCluster"].Value;
            SyntaxContext context       = this.m_syntaxDefinition.GetContextOrNull(syntaxId);

            if (null == context)
            {
                context = this.m_syntaxDefinition.CreateNewContext(syntaxId);
                this.ImportSyntax(m, context);
            }

            if (targetCluster != null)
            {
                Cluster topCluster = this.m_syntaxDefinition.GetCluster(targetCluster, this.SourceFile.SyntaxContext);
                context.AddTopCluster(topCluster);
            }
        }