Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ydah
Copy link
Member

@ydah ydah commented Feb 27, 2024

For example, if printf("pair odd even:% d\n," $1); was unable to access the pair side of $$with $1, fix this:

%rule pair(X, Y): X Y
  {
    $$ = $1 + $2;
    printf("(%d, %d)\n", $1, $2);
  }
  ;

stmt: pair(ODD, EVEN) <num> { printf("pair odd even: %d\n", $1); }

…annot access `$$` in the rule

For example, if `printf("pair odd even:% d\n," $1); `was unable to access the pair side of` $$`with` $1`, fix this:
```
%rule pair(X, Y): X Y
  {
    $$ = $1 + $2;
    printf("(%d, %d)\n", $1, $2);
  }
  ;

stmt: pair(ODD, EVEN) <num> { printf("pair odd even: %d\n", $1); }
```
@yui-knk yui-knk merged commit 85b2fe2 into ruby:master Feb 28, 2024
@yui-knk
Copy link
Collaborator

yui-knk commented Feb 28, 2024

Thank you!

@ydah ydah deleted the fix-user-defined-action branch February 28, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants