示例#1
0
        public void EnterBlock(string name, TagStatement statement)
        {
            if (_blocks == null)
            {
                _blocks = new Dictionary <string, List <Statement> >();
            }

            if (!_blocks.TryGetValue(name, out var blockStatements))
            {
                _blocks.Add(name, blockStatements = new List <Statement>());
            }

            blockStatements.Add(statement);
            _transientStatements = statement.Statements;
        }
 /// <summary>
 /// Invoked when a section is entered to create a new statements context
 /// which will received all subsequent statements.
 /// </summary>
 public void EnterBlockSection(string name, TagStatement statement)
 {
     CurrentBlock.EnterBlock(name, statement);
 }