Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded parenthesis from calls in macro expression #5493

Merged
merged 2 commits into from
Jan 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/compiler/semantic/macro_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ describe "Semantic: macro" do
class A
end

{% skip_file() %}
{% skip_file %}

class B
end
Expand All @@ -1066,7 +1066,7 @@ describe "Semantic: macro" do

{% if true %}
class C; end
{% skip_file() %}
{% skip_file %}
class D; end
{% end %}

Expand Down
2 changes: 1 addition & 1 deletion src/callstack.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() if flag?(:win32) %}
{% skip_file if flag?(:win32) %}

require "c/dlfcn"
require "c/stdio"
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/crystal/macros/interpreter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module Crystal
@scope : Type, @path_lookup : Type, @location : Location?,
@vars = {} of String => ASTNode, @block : Block? = nil, @def : Def? = nil,
@in_macro = false)
@str = IO::Memory.new(512) # Can't be String::Builder because of `{{debug()}}
@str = IO::Memory.new(512) # Can't be String::Builder because of `{{debug}}`
@last = Nop.new
end

Expand Down
2 changes: 1 addition & 1 deletion src/crystal/system/unix/arc4random.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() unless flag?(:openbsd) %}
{% skip_file unless flag?(:openbsd) %}

require "c/stdlib"

Expand Down
2 changes: 1 addition & 1 deletion src/crystal/system/unix/getrandom.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() unless flag?(:linux) %}
{% skip_file unless flag?(:linux) %}

require "c/unistd"
require "c/sys/syscall"
Expand Down
2 changes: 1 addition & 1 deletion src/crystal/system/unix/sysconf_cpucount.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() if flag?(:openbsd) || flag?(:freebsd) %}
{% skip_file if flag?(:openbsd) || flag?(:freebsd) %}

require "c/unistd"

Expand Down
2 changes: 1 addition & 1 deletion src/crystal/system/unix/sysctl_cpucount.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() unless flag?(:openbsd) || flag?(:freebsd) %}
{% skip_file unless flag?(:openbsd) || flag?(:freebsd) %}

require "c/sysctl"

Expand Down
3 changes: 1 addition & 2 deletions src/crystal/system/unix/urandom.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# TODO: replace with `flag?(:unix) && !flag?(:openbsd) && !flag?(:linux)` after crystal > 0.22.0 is released
{% skip_file() if flag?(:openbsd) && flag?(:linux) %}
{% skip_file unless flag?(:unix) && !flag?(:openbsd) && !flag?(:linux) %}

module Crystal::System::Random
@@initialized = false
Expand Down
2 changes: 1 addition & 1 deletion src/io/console.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() if flag?(:win32) %}
{% skip_file if flag?(:win32) %}

require "termios"

Expand Down
2 changes: 1 addition & 1 deletion src/io/encoding.cr
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class IO
end
end

{% skip_file() if flag?(:win32) %}
{% skip_file if flag?(:win32) %}

private class Encoder
def initialize(@encoding_options : EncodingOptions)
Expand Down
2 changes: 1 addition & 1 deletion src/io/syscall.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file() if flag?(:win32) %}
{% skip_file if flag?(:win32) %}

module IO::Syscall
@read_timed_out = false
Expand Down