Exemplo n.º 1
0
 public IPopulateScope <IFrontendCodeElement, ISetUpSideNode>[] ParseBlock(CurleyBracketToken block)
 {
     return(block.Tokens.Select(x =>
     {
         if (x is LineToken lineToken)
         {
             return ParseLine(lineToken.Tokens);
         }
         throw new Exception("unexpected token type");
     }).ToArray());
 }
Exemplo n.º 2
0
        public IReadOnlyList <IOrType <ISetUp <IBox <WeakMemberReference>, Tpn.ITypeProblemNode>, IError> > ParseType(CurleyBracketToken block)
        {
            var list = new List <IOrType <ISetUp <IBox <WeakMemberReference>, Tpn.ITypeProblemNode>, IError> >();

            foreach (var line in block.Tokens)
            {
                list.Add(ParseTypeLine(line.CastTo <LineToken>().Tokens));
            }



            return(list);
        }
Exemplo n.º 3
0
        public IOrType <ISetUp <IBox <IFrontendCodeElement>, Tpn.ITypeProblemNode>, IError>[] ParseBlock(CurleyBracketToken block)
        {
            var res = new List <IOrType <ISetUp <IBox <IFrontendCodeElement>, Tpn.ITypeProblemNode>, IError> >();

            foreach (var line in block.Tokens)
            {
                res.Add(ParseLine(line.CastTo <LineToken>().Tokens));
            }

            return(res.ToArray());
        }