ffi-clang 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +4 -0
- data/ext/rakefile.rb +4 -0
- data/ext/teapot.rb +4 -3
- data/lib/ffi/clang/clang_version.rb +9 -19
- data/lib/ffi/clang/code_completion.rb +4 -18
- data/lib/ffi/clang/comment.rb +7 -19
- data/lib/ffi/clang/compilation_database.rb +4 -18
- data/lib/ffi/clang/cursor.rb +70 -25
- data/lib/ffi/clang/diagnostic.rb +8 -21
- data/lib/ffi/clang/file.rb +4 -18
- data/lib/ffi/clang/index.rb +9 -20
- data/lib/ffi/clang/lib/clang_version.rb +5 -19
- data/lib/ffi/clang/lib/code_completion.rb +4 -18
- data/lib/ffi/clang/lib/comment.rb +7 -20
- data/lib/ffi/clang/lib/compilation_database.rb +4 -18
- data/lib/ffi/clang/lib/cursor.rb +34 -23
- data/lib/ffi/clang/lib/diagnostic.rb +7 -20
- data/lib/ffi/clang/lib/file.rb +5 -20
- data/lib/ffi/clang/lib/inclusions.rb +5 -19
- data/lib/ffi/clang/lib/index.rb +6 -20
- data/lib/ffi/clang/lib/source_location.rb +5 -20
- data/lib/ffi/clang/lib/source_range.rb +5 -22
- data/lib/ffi/clang/lib/string.rb +6 -20
- data/lib/ffi/clang/lib/token.rb +4 -18
- data/lib/ffi/clang/lib/translation_unit.rb +6 -20
- data/lib/ffi/clang/lib/type.rb +8 -20
- data/lib/ffi/clang/lib.rb +15 -20
- data/lib/ffi/clang/source_location.rb +7 -20
- data/lib/ffi/clang/source_range.rb +7 -22
- data/lib/ffi/clang/token.rb +4 -18
- data/lib/ffi/clang/translation_unit.rb +10 -20
- data/lib/ffi/clang/type.rb +7 -19
- data/lib/ffi/clang/unsaved_file.rb +6 -20
- data/lib/ffi/clang/version.rb +7 -21
- data/lib/ffi/clang.rb +9 -20
- data/license.md +38 -0
- data/readme.md +46 -0
- data.tar.gz.sig +0 -0
- metadata +71 -73
- metadata.gz.sig +2 -0
- data/.editorconfig +0 -23
- data/.gitignore +0 -19
- data/.rspec +0 -5
- data/.travis.yml +0 -30
- data/Gemfile +0 -12
- data/README.md +0 -74
- data/Rakefile +0 -12
- data/examples/docs.cpp +0 -25
- data/examples/docs.rb +0 -31
- data/ffi-clang.gemspec +0 -25
- data/spec/ffi/clang/code_completion_spec.rb +0 -181
- data/spec/ffi/clang/comment_spec.rb +0 -453
- data/spec/ffi/clang/compilation_database_spec.rb +0 -180
- data/spec/ffi/clang/cursor_spec.rb +0 -741
- data/spec/ffi/clang/diagnostic_spec.rb +0 -89
- data/spec/ffi/clang/file_spec.rb +0 -82
- data/spec/ffi/clang/fixtures/a.c +0 -7
- data/spec/ffi/clang/fixtures/canonical.c +0 -5
- data/spec/ffi/clang/fixtures/class.cpp +0 -8
- data/spec/ffi/clang/fixtures/compile_commands.json +0 -17
- data/spec/ffi/clang/fixtures/completion.cxx +0 -8
- data/spec/ffi/clang/fixtures/docs.c +0 -1
- data/spec/ffi/clang/fixtures/docs.cc +0 -1
- data/spec/ffi/clang/fixtures/docs.h +0 -54
- data/spec/ffi/clang/fixtures/list.c +0 -11
- data/spec/ffi/clang/fixtures/location1.c +0 -7
- data/spec/ffi/clang/fixtures/simple.ast +0 -0
- data/spec/ffi/clang/fixtures/simple.c +0 -3
- data/spec/ffi/clang/fixtures/test.cxx +0 -62
- data/spec/ffi/clang/index_spec.rb +0 -90
- data/spec/ffi/clang/source_location_spec.rb +0 -138
- data/spec/ffi/clang/source_range_spec.rb +0 -74
- data/spec/ffi/clang/token_spec.rb +0 -82
- data/spec/ffi/clang/translation_unit_spec.rb +0 -220
- data/spec/ffi/clang/type_spec.rb +0 -273
- data/spec/ffi/clang/version_spec.rb +0 -28
- data/spec/spec_helper.rb +0 -51
@@ -1,22 +1,8 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2014, by Greg Hazel.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'file'
|
22
8
|
require_relative 'source_location'
|
data/lib/ffi/clang/lib/index.rb
CHANGED
@@ -1,23 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
21
7
|
|
22
8
|
module FFI
|
23
9
|
module Clang
|
@@ -1,24 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Garry Marshall.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
3
6
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
7
|
|
23
8
|
require_relative 'file'
|
24
9
|
|
@@ -1,26 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
# Copyright, 2013, by Garry
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Garry Marshall.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
5
6
|
# Copyright, 2014, by Masahiro Sano.
|
6
|
-
#
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
# of this software and associated documentation files (the "Software"), to deal
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
12
|
-
# furnished to do so, subject to the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be included in
|
15
|
-
# all copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
-
# THE SOFTWARE.
|
24
7
|
|
25
8
|
require_relative 'source_location'
|
26
9
|
|
data/lib/ffi/clang/lib/string.rb
CHANGED
@@ -1,23 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
21
7
|
|
22
8
|
module FFI
|
23
9
|
module Clang
|
data/lib/ffi/clang/lib/token.rb
CHANGED
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
module FFI
|
22
8
|
module Clang
|
@@ -1,24 +1,10 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
3
5
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
6
|
+
# Copyright, 2019, by Hayden Purdy.
|
7
|
+
# Copyright, 2022, by Motonori Iwamuro.
|
22
8
|
|
23
9
|
require_relative 'index'
|
24
10
|
|
data/lib/ffi/clang/lib/type.rb
CHANGED
@@ -1,23 +1,11 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2013, by Takeshi Watanabe.
|
7
|
+
# Copyright, 2013-2014, by Masahiro Sano.
|
8
|
+
# Copyright, 2014, by Niklas Therning.
|
21
9
|
|
22
10
|
module FFI
|
23
11
|
module Clang
|
data/lib/ffi/clang/lib.rb
CHANGED
@@ -1,23 +1,18 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010-2012, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013-2014, by Carlos Martín Nieto.
|
8
|
+
# Copyright, 2013, by Takeshi Watanabe.
|
9
|
+
# Copyright, 2014, by Masahiro Sano.
|
10
|
+
# Copyright, 2014, by Greg Hazel.
|
11
|
+
# Copyright, 2014, by Niklas Therning.
|
12
|
+
# Copyright, 2016, by Mike Dalessio.
|
13
|
+
# Copyright, 2019, by Hayden Purdy.
|
14
|
+
# Copyright, 2019, by Dominic Sisnero.
|
15
|
+
# Copyright, 2020, by Luikore.
|
21
16
|
|
22
17
|
require 'mkmf'
|
23
18
|
|
@@ -1,24 +1,11 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013, by Garry Marshall.
|
3
8
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
9
|
|
23
10
|
require_relative 'lib/source_location'
|
24
11
|
require_relative 'lib/file'
|
@@ -1,26 +1,11 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
# Copyright,
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013, by Garry Marshall.
|
5
8
|
# Copyright, 2014, by Masahiro Sano.
|
6
|
-
#
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
# of this software and associated documentation files (the "Software"), to deal
|
9
|
-
# in the Software without restriction, including without limitation the rights
|
10
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
# copies of the Software, and to permit persons to whom the Software is
|
12
|
-
# furnished to do so, subject to the following conditions:
|
13
|
-
#
|
14
|
-
# The above copyright notice and this permission notice shall be included in
|
15
|
-
# all copies or substantial portions of the Software.
|
16
|
-
#
|
17
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
-
# THE SOFTWARE.
|
24
9
|
|
25
10
|
require_relative 'lib/source_range'
|
26
11
|
|
data/lib/ffi/clang/token.rb
CHANGED
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'lib/token'
|
22
8
|
require_relative 'lib/cursor'
|
@@ -1,24 +1,14 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013, by Garry Marshall.
|
3
8
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
9
|
+
# Copyright, 2014, by Greg Hazel.
|
10
|
+
# Copyright, 2019, by Michael Metivier.
|
11
|
+
# Copyright, 2022, by Motonori Iwamuro.
|
22
12
|
|
23
13
|
require_relative 'lib/translation_unit'
|
24
14
|
require_relative 'lib/inclusions'
|
data/lib/ffi/clang/type.rb
CHANGED
@@ -1,23 +1,11 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2013, by Takeshi Watanabe.
|
2
7
|
# Copyright, 2014, by Masahiro Sano.
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
8
|
+
# Copyright, 2014, by Niklas Therning.
|
21
9
|
|
22
10
|
module FFI
|
23
11
|
module Clang
|
@@ -1,23 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2014, by Masahiro Sano.
|
21
7
|
|
22
8
|
module FFI
|
23
9
|
module Clang
|
data/lib/ffi/clang/version.rb
CHANGED
@@ -1,26 +1,12 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
21
7
|
|
22
8
|
module FFI
|
23
9
|
module Clang
|
24
|
-
VERSION = "0.
|
10
|
+
VERSION = "0.8.0"
|
25
11
|
end
|
26
12
|
end
|
data/lib/ffi/clang.rb
CHANGED
@@ -1,23 +1,12 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010-2011, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013, by Garry Marshall.
|
8
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
9
|
+
# Copyright, 2014, by Masahiro Sano.
|
21
10
|
|
22
11
|
require 'ffi'
|
23
12
|
require 'rbconfig'
|
data/license.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2010-2012, by Jari Bakken.
|
4
|
+
Copyright, 2012, by Hal Brodigan.
|
5
|
+
Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
Copyright, 2013, by Garry Marshall.
|
7
|
+
Copyright, 2013-2014, by Carlos Martín Nieto.
|
8
|
+
Copyright, 2013, by Dave Wilkinson.
|
9
|
+
Copyright, 2013, by Takeshi Watanabe.
|
10
|
+
Copyright, 2013-2014, by Masahiro Sano.
|
11
|
+
Copyright, 2014, by George Pimm.
|
12
|
+
Copyright, 2014, by Greg Hazel.
|
13
|
+
Copyright, 2014-2015, by Niklas Therning.
|
14
|
+
Copyright, 2016, by Mike Dalessio.
|
15
|
+
Copyright, 2017, by Cameron Dutro.
|
16
|
+
Copyright, 2019, by Hayden Purdy.
|
17
|
+
Copyright, 2019, by Michael Metivier.
|
18
|
+
Copyright, 2019, by Dominic Sisnero.
|
19
|
+
Copyright, 2020, by Luikore.
|
20
|
+
Copyright, 2022, by Motonori Iwamuro.
|
21
|
+
|
22
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
23
|
+
of this software and associated documentation files (the "Software"), to deal
|
24
|
+
in the Software without restriction, including without limitation the rights
|
25
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
26
|
+
copies of the Software, and to permit persons to whom the Software is
|
27
|
+
furnished to do so, subject to the following conditions:
|
28
|
+
|
29
|
+
The above copyright notice and this permission notice shall be included in all
|
30
|
+
copies or substantial portions of the Software.
|
31
|
+
|
32
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
33
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
34
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
35
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
36
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
37
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
38
|
+
SOFTWARE.
|
data/readme.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# FFI::Clang
|
2
|
+
|
3
|
+
A light-weight wrapper for Ruby exposing [libclang](http://llvm.org/devmtg/2010-11/Gregor-libclang.pdf). Works for libclang v3.4+.
|
4
|
+
|
5
|
+
[![Development Status](https://github.com/ioquatix/ffi-clang/workflows/Test/badge.svg)](https://github.com/ioquatix/ffi-clang/actions?workflow=Test)
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'ffi-clang'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install ffi-clang
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Traverse the AST in the given file:
|
24
|
+
|
25
|
+
index = Index.new
|
26
|
+
translation_unit = index.parse_translation_unit("list.c")
|
27
|
+
cursor = translation_unit.cursor
|
28
|
+
cursor.visit_children do |cursor, parent|
|
29
|
+
puts "#{cursor.kind} #{cursor.spelling.inspect}"
|
30
|
+
|
31
|
+
next :recurse
|
32
|
+
end
|
33
|
+
|
34
|
+
### Library Version
|
35
|
+
|
36
|
+
Due to issues figuring out which library to use, we require you to manually specify it. For example, to run the tests, with MacPorts llvm/clang 3.4, use the following:
|
37
|
+
|
38
|
+
LLVM_CONFIG=llvm-config-mp-3.4 rake
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
1. Fork it
|
43
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
45
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
46
|
+
5. Create new Pull Request
|
data.tar.gz.sig
ADDED
Binary file
|