public TreeContextVisitor(TreeContext initialContext)
        {
            if (initialContext == null)
            {
                throw new ArgumentNullException(nameof(initialContext));
            }

            _context = initialContext;
        }
        /// <summary>
        /// Constructs nested tree context.
        /// </summary>
        /// <param name="scope">Current tree scope.</param>
        /// <param name="parent">Parent context, cannot be <c>null</c>.</param>
        protected TreeContext(AstNode scope, TreeContext parent)
        {
            if (scope == null)
            {
                throw new ArgumentNullException(nameof(scope));
            }

            _parentContext = parent;
            _scope         = scope;
        }
Exemple #3
0
 public TokenVisitor(TreeContext initialContext, ITokenComposer composer) : base(initialContext)
 {
     _composer = composer ?? DefaultTokenComposer.Instance;  // TODO: to TreeContext
 }
Exemple #4
0
 public TreeContextVisitor(TreeContext context)
 {
     Context = context ?? throw new ArgumentNullException(nameof(context));
 }