Beispiel #1
0
        public override bool VisitTopLevelUsingNamespace([NotNull] GamaParser.TopLevelUsingNamespaceContext context)
        {
            var ns = GlobalContext.GetNamespaceChain(context.fqtn().Symbol().Select(s => s.GetText()).ToArray());

            if (ns == null)
            {
                GlobalContext.AddError(new ErrorUsingNamespaceNotFound(context.fqtn()));
                return(false);
            }

            NamespaceContext.AddImport(ns);
            return(true);
        }