diff options
author | Zefram <zefram@fysh.org> | 2014-02-01 01:27:13 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2014-02-01 01:27:15 +0000 |
commit | 30d9c59b5f3cba8b5d632d20c2370e82d8ba69ca (patch) | |
tree | 989db43c82b395cec053b341532db7a145827254 /perly.h | |
parent | ef463b6d87c1ce4e4946bdf785d47e481c1f33f2 (diff) | |
download | perl-30d9c59b5f3cba8b5d632d20c2370e82d8ba69ca.tar.gz |
subroutine signatures
Declarative syntax to unwrap argument list into lexical variables.
"sub foo ($a,$b) {...}" checks number of arguments and puts the
arguments into lexical variables. Signatures are not equivalent to the
existing idiom of "sub foo { my($a,$b) = @_; ... }". Signatures are only
available by enabling a non-default feature, and generate warnings about
being experimental. The syntactic clash with prototypes is managed by
disabling the short prototype syntax when signatures are enabled.
Diffstat (limited to 'perly.h')
-rw-r--r-- | perly.h | 34 |
1 files changed, 9 insertions, 25 deletions
@@ -5,11 +5,11 @@ */ #ifdef PERL_CORE -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ +/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,13 +37,6 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif /* Tokens. */ #ifndef YYTOKENTYPE @@ -219,6 +212,7 @@ extern int yydebug; #define PEG 338 + #ifdef PERL_IN_TOKE_C static bool S_is_opval_token(int type) { @@ -245,7 +239,8 @@ S_is_opval_token(int type) { #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 2053 of yacc.c */ + +/* Line 2068 of yacc.c */ I32 ival; /* __DEFAULT__ (marker for regen_perly.pl; must always be 1st union member) */ @@ -264,7 +259,8 @@ typedef union YYSTYPE #endif -/* Line 2053 of yacc.c */ + +/* Line 2068 of yacc.c */ } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -272,22 +268,10 @@ typedef union YYSTYPE #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ + /* Generated from: - * 911fbbcab275e0f9645397ee5b80a7c2384e6b24f793c15e6d6e918ebfd4e384 perly.y + * bb8245a1a537b2afb2445b3973f63b210f9ec346a1955071aef7d05ba97196ae perly.y * 5c9d2a0262457fe9b70073fc8ad6c188f812f38ad57712b7e2f53daa01b297cc regen_perly.pl * ex: set ro: */ |