Skip to content

Commit

Permalink
Describe flip-flops in AST_FORMAT (refs #69).
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Jun 16, 2013
1 parent 1cc4966 commit bf90166
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/AST_FORMAT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ AST and Source Location RFC
* Should we handle these cases at all? They do not have special syntax associated.
1. How to handle lvar-injecting match (`if /(?<a>foo)/ =~ bar`)?
1. How to handle magic match (`foo if /bar/`)?
1. How to handle sed-like flip-flop?
1. How to handle awk-like flip-flop?

## Literals

Expand Down Expand Up @@ -366,6 +364,22 @@ Format:
~~~~~~~~~~~ expression
~~~

### Flip-flops

Format:

~~~
(iflip (lvar :a) (lvar :b))
"if a..b; end"
~~ operator
~~~~ expression
(eflip (lvar :a) (lvar :b))
"if a...b; end"
~~~ operator
~~~~~ expression
~~~

## Assignment

### To local variable
Expand Down

0 comments on commit bf90166

Please sign in to comment.