Skip to content

Commit 3515968

Browse files
straight-shootaRX14
authored andcommittedJan 20, 2018
Remove unneeded parenthesis from calls in macro expression (#5493)
* Remove parenthesis from macro calls without arguments: not needed anymore as of 0.24.0 * Resolve TODO in urandom
1 parent a288123 commit 3515968

File tree

11 files changed

+12
-13
lines changed

11 files changed

+12
-13
lines changed
 

‎spec/compiler/semantic/macro_spec.cr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ describe "Semantic: macro" do
10491049
class A
10501050
end
10511051
1052-
{% skip_file() %}
1052+
{% skip_file %}
10531053
10541054
class B
10551055
end
@@ -1066,7 +1066,7 @@ describe "Semantic: macro" do
10661066
10671067
{% if true %}
10681068
class C; end
1069-
{% skip_file() %}
1069+
{% skip_file %}
10701070
class D; end
10711071
{% end %}
10721072

‎src/callstack.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() if flag?(:win32) %}
1+
{% skip_file if flag?(:win32) %}
22

33
require "c/dlfcn"
44
require "c/stdio"

‎src/compiler/crystal/macros/interpreter.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module Crystal
7777
@scope : Type, @path_lookup : Type, @location : Location?,
7878
@vars = {} of String => ASTNode, @block : Block? = nil, @def : Def? = nil,
7979
@in_macro = false)
80-
@str = IO::Memory.new(512) # Can't be String::Builder because of `{{debug()}}
80+
@str = IO::Memory.new(512) # Can't be String::Builder because of `{{debug}}`
8181
@last = Nop.new
8282
end
8383

‎src/crystal/system/unix/arc4random.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() unless flag?(:openbsd) %}
1+
{% skip_file unless flag?(:openbsd) %}
22

33
require "c/stdlib"
44

‎src/crystal/system/unix/getrandom.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() unless flag?(:linux) %}
1+
{% skip_file unless flag?(:linux) %}
22

33
require "c/unistd"
44
require "c/sys/syscall"

‎src/crystal/system/unix/sysconf_cpucount.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() if flag?(:openbsd) || flag?(:freebsd) %}
1+
{% skip_file if flag?(:openbsd) || flag?(:freebsd) %}
22

33
require "c/unistd"
44

‎src/crystal/system/unix/sysctl_cpucount.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() unless flag?(:openbsd) || flag?(:freebsd) %}
1+
{% skip_file unless flag?(:openbsd) || flag?(:freebsd) %}
22

33
require "c/sysctl"
44

‎src/crystal/system/unix/urandom.cr

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# TODO: replace with `flag?(:unix) && !flag?(:openbsd) && !flag?(:linux)` after crystal > 0.22.0 is released
2-
{% skip_file() if flag?(:openbsd) && flag?(:linux) %}
1+
{% skip_file unless flag?(:unix) && !flag?(:openbsd) && !flag?(:linux) %}
32

43
module Crystal::System::Random
54
@@initialized = false

‎src/io/console.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() if flag?(:win32) %}
1+
{% skip_file if flag?(:win32) %}
22

33
require "termios"
44

‎src/io/encoding.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class IO
1515
end
1616
end
1717

18-
{% skip_file() if flag?(:win32) %}
18+
{% skip_file if flag?(:win32) %}
1919

2020
private class Encoder
2121
def initialize(@encoding_options : EncodingOptions)

‎src/io/syscall.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% skip_file() if flag?(:win32) %}
1+
{% skip_file if flag?(:win32) %}
22

33
module IO::Syscall
44
@read_timed_out = false

0 commit comments

Comments
 (0)
Please sign in to comment.