1
0
mirror of https://github.com/specht/champ.git synced 2024-11-27 07:51:33 +00:00

Comment out champ directives with a ; => @;Au

This commit is contained in:
Michael Specht 2018-02-16 15:24:02 +01:00
parent 9ec638d934
commit 3143e53c8a
2 changed files with 9 additions and 1 deletions

View File

@ -149,6 +149,14 @@ This will plot FOO against X:
![FOO against A at PC 0x6015](doc/example03_3.gif?raw=true) ![FOO against A at PC 0x6015](doc/example03_3.gif?raw=true)
### Disabling watches
To disable a watch, add a `;` right behind the `@`:
```
ADC FOO ; @;Au(post)
```
## Did you know? ## Did you know?
By the way, there's a full-fledged, incremental, standalone, no-dependencies GIF encoder in [pgif.c](pgif.c) that writes animated GIFs and uses some optimizations to further minimize space. It's stream-friendly and as you feed pixels in via `stdin`, it dutifully writes GIF data to `stdout` until `stdin` gets closed. By the way, there's a full-fledged, incremental, standalone, no-dependencies GIF encoder in [pgif.c](pgif.c) that writes animated GIFs and uses some optimizations to further minimize space. It's stream-friendly and as you feed pixels in via `stdin`, it dutifully writes GIF data to `stdout` until `stdin` gets closed.

View File

@ -631,7 +631,7 @@ class Champ
champ_directives = [] champ_directives = []
if code.include?(';') if code.include?(';')
comment = code[code.index(';') + 1, code.size].strip comment = code[code.index(';') + 1, code.size].strip
comment.scan(/@[^\s]+/).each do |match| comment.scan(/@[^;][^\s]+/).each do |match|
champ_directives << match.to_s champ_directives << match.to_s
end end
end end