예제 #1
0
파일: Parser.cs 프로젝트: CloudIDEaaS/hydra
 private void FillCLRStringSignature(SignatureDeclaration signature)
 {
     signature.TypeParameters = ParseCLRStringTypeParameters();
     signature.Parameters     = ParseCLRStringParameterList();
 }
예제 #2
0
파일: Parser.cs 프로젝트: hesam/SketchSharp
 private void ParseNestedDelegateDeclaration(List<ITypeDeclarationMember> typeMembers, List<SourceCustomAttribute>/*?*/ attributes, TypeDeclaration.Flags flags, SourceLocationBuilder sctx, TokenSet followers)
   //^ requires this.currentToken == Token.Delegate;
   //^ ensures followers[this.currentToken] || this.currentToken == Token.EndOfFile;
 {
   this.GetNextToken();
   TypeExpression returnType = this.ParseTypeExpression(false, false, followers|Token.LeftParenthesis|Token.Semicolon|Parser.IdentifierOrNonReservedKeyword);
   if (!Parser.IdentifierOrNonReservedKeyword[this.currentToken])
     this.HandleError(Error.ExpectedIdentifier);
   NameDeclaration name = this.ParseNameDeclaration();
   List<Ast.GenericTypeParameterDeclaration> genericParameters = new List<Ast.GenericTypeParameterDeclaration>();
   List<Ast.ParameterDeclaration> parameters = new List<Ast.ParameterDeclaration>();
   SignatureDeclaration signature = new SignatureDeclaration(returnType, parameters, sctx);
   NestedDelegateDeclaration type = new NestedDelegateDeclaration(attributes, flags, name, genericParameters, signature, sctx);
   typeMembers.Add(type);
   this.ParseGenericTypeParameters(genericParameters, followers|Token.LeftParenthesis|Token.Where|Token.Semicolon);
   this.ParseParameters(parameters, Token.RightParenthesis, followers|Token.Where|Token.Semicolon, sctx);
   this.ParseGenericTypeParameterConstraintsClauses(genericParameters, followers|Token.Semicolon);
   sctx.UpdateToSpan(this.scanner.SourceLocationOfLastScannedToken);
   if (this.currentToken == Token.Semicolon)
     this.GetNextToken();
   this.SkipTo(followers);
 }