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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +4 -0
  3. data/ext/rakefile.rb +4 -0
  4. data/ext/teapot.rb +4 -3
  5. data/lib/ffi/clang/clang_version.rb +9 -19
  6. data/lib/ffi/clang/code_completion.rb +4 -18
  7. data/lib/ffi/clang/comment.rb +7 -19
  8. data/lib/ffi/clang/compilation_database.rb +4 -18
  9. data/lib/ffi/clang/cursor.rb +70 -25
  10. data/lib/ffi/clang/diagnostic.rb +8 -21
  11. data/lib/ffi/clang/file.rb +4 -18
  12. data/lib/ffi/clang/index.rb +9 -20
  13. data/lib/ffi/clang/lib/clang_version.rb +5 -19
  14. data/lib/ffi/clang/lib/code_completion.rb +4 -18
  15. data/lib/ffi/clang/lib/comment.rb +7 -20
  16. data/lib/ffi/clang/lib/compilation_database.rb +4 -18
  17. data/lib/ffi/clang/lib/cursor.rb +34 -23
  18. data/lib/ffi/clang/lib/diagnostic.rb +7 -20
  19. data/lib/ffi/clang/lib/file.rb +5 -20
  20. data/lib/ffi/clang/lib/inclusions.rb +5 -19
  21. data/lib/ffi/clang/lib/index.rb +6 -20
  22. data/lib/ffi/clang/lib/source_location.rb +5 -20
  23. data/lib/ffi/clang/lib/source_range.rb +5 -22
  24. data/lib/ffi/clang/lib/string.rb +6 -20
  25. data/lib/ffi/clang/lib/token.rb +4 -18
  26. data/lib/ffi/clang/lib/translation_unit.rb +6 -20
  27. data/lib/ffi/clang/lib/type.rb +8 -20
  28. data/lib/ffi/clang/lib.rb +15 -20
  29. data/lib/ffi/clang/source_location.rb +7 -20
  30. data/lib/ffi/clang/source_range.rb +7 -22
  31. data/lib/ffi/clang/token.rb +4 -18
  32. data/lib/ffi/clang/translation_unit.rb +10 -20
  33. data/lib/ffi/clang/type.rb +7 -19
  34. data/lib/ffi/clang/unsaved_file.rb +6 -20
  35. data/lib/ffi/clang/version.rb +7 -21
  36. data/lib/ffi/clang.rb +9 -20
  37. data/license.md +38 -0
  38. data/readme.md +46 -0
  39. data.tar.gz.sig +0 -0
  40. metadata +71 -73
  41. metadata.gz.sig +2 -0
  42. data/.editorconfig +0 -23
  43. data/.gitignore +0 -19
  44. data/.rspec +0 -5
  45. data/.travis.yml +0 -30
  46. data/Gemfile +0 -12
  47. data/README.md +0 -74
  48. data/Rakefile +0 -12
  49. data/examples/docs.cpp +0 -25
  50. data/examples/docs.rb +0 -31
  51. data/ffi-clang.gemspec +0 -25
  52. data/spec/ffi/clang/code_completion_spec.rb +0 -181
  53. data/spec/ffi/clang/comment_spec.rb +0 -453
  54. data/spec/ffi/clang/compilation_database_spec.rb +0 -180
  55. data/spec/ffi/clang/cursor_spec.rb +0 -741
  56. data/spec/ffi/clang/diagnostic_spec.rb +0 -89
  57. data/spec/ffi/clang/file_spec.rb +0 -82
  58. data/spec/ffi/clang/fixtures/a.c +0 -7
  59. data/spec/ffi/clang/fixtures/canonical.c +0 -5
  60. data/spec/ffi/clang/fixtures/class.cpp +0 -8
  61. data/spec/ffi/clang/fixtures/compile_commands.json +0 -17
  62. data/spec/ffi/clang/fixtures/completion.cxx +0 -8
  63. data/spec/ffi/clang/fixtures/docs.c +0 -1
  64. data/spec/ffi/clang/fixtures/docs.cc +0 -1
  65. data/spec/ffi/clang/fixtures/docs.h +0 -54
  66. data/spec/ffi/clang/fixtures/list.c +0 -11
  67. data/spec/ffi/clang/fixtures/location1.c +0 -7
  68. data/spec/ffi/clang/fixtures/simple.ast +0 -0
  69. data/spec/ffi/clang/fixtures/simple.c +0 -3
  70. data/spec/ffi/clang/fixtures/test.cxx +0 -62
  71. data/spec/ffi/clang/index_spec.rb +0 -90
  72. data/spec/ffi/clang/source_location_spec.rb +0 -138
  73. data/spec/ffi/clang/source_range_spec.rb +0 -74
  74. data/spec/ffi/clang/token_spec.rb +0 -82
  75. data/spec/ffi/clang/translation_unit_spec.rb +0 -220
  76. data/spec/ffi/clang/type_spec.rb +0 -273
  77. data/spec/ffi/clang/version_spec.rb +0 -28
  78. data/spec/spec_helper.rb +0 -51
@@ -1,22 +1,8 @@
1
- # Copyright, 2014, by Greg Hazel
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.
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'
@@ -1,23 +1,9 @@
1
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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.
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
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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
- # -*- coding: utf-8 -*-
2
- # Copyright, 2010-2012 by Jari Bakken.
3
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- # Copyright, 2013, by Garry C. Marshall. <http://www.meaningfulname.net>
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
 
@@ -1,23 +1,9 @@
1
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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.
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,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
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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
- # 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.
6
+ # Copyright, 2019, by Hayden Purdy.
7
+ # Copyright, 2022, by Motonori Iwamuro.
22
8
 
23
9
  require_relative 'index'
24
10
 
@@ -1,23 +1,11 @@
1
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- # 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.
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
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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.
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
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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
- # -*- coding: utf-8 -*-
2
- # Copyright, 2010-2012 by Jari Bakken.
3
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- # Copyright, 2013, by Garry C. Marshall. <http://www.meaningfulname.net>
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
 
@@ -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
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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.
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'
@@ -1,23 +1,11 @@
1
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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
- # -*- coding: utf-8 -*-
2
- # Copyright, 2013, by Carlos Martín Nieto <cmn@dwim.me.
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.
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
@@ -1,26 +1,12 @@
1
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
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.
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.7.0"
10
+ VERSION = "0.8.0"
25
11
  end
26
12
  end
data/lib/ffi/clang.rb CHANGED
@@ -1,23 +1,12 @@
1
- # Copyright, 2010-2012 by Jari Bakken.
2
- # Copyright, 2013, by Samuel G. D. Williams. <http://www.codeotaku.com>
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.
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