@@ -37,7 +37,7 @@ defmodule Gradient.AstSpecifierTest do
3737
3838 [ block , inline | _ ] = AstSpecifier . run_mappers ( ast , tokens ) |> Enum . reverse ( )
3939
40- assert { :function , 2 , :int , 0 , [ { :clause , 2 , [ ] , [ ] , [ { :integer , 2 , 1 } ] } ] } = inline
40+ assert { :function , 2 , :int , 0 , [ { :clause , 2 , [ ] , [ ] , [ { :integer , [ location: { 2 , 16 } , end_location: { 2 , 17 } ] , 1 } ] } ] } = inline
4141
4242 assert { :function , 4 , :int_block , 0 , [ { :clause , 4 , [ ] , [ ] , [ { :integer , 5 , 2 } ] } ] } = block
4343 end
@@ -46,7 +46,7 @@ defmodule Gradient.AstSpecifierTest do
4646 { tokens , ast } = load ( "Elixir.Basic.Float.beam" , "basic/float.ex" )
4747
4848 [ block , inline | _ ] = AstSpecifier . run_mappers ( ast , tokens ) |> Enum . reverse ( )
49- assert { :function , 2 , :float , 0 , [ { :clause , 2 , [ ] , [ ] , [ { :float , 2 , 0.12 } ] } ] } = inline
49+ assert { :function , 2 , :float , 0 , [ { :clause , 2 , [ ] , [ ] , [ { :float , [ location: { 2 , 18 } , end_location: { 2 , 22 } ] , 0.12 } ] } ] } = inline
5050
5151 assert { :function , 4 , :float_block , 0 , [ { :clause , 4 , [ ] , [ ] , [ { :float , 5 , 0.12 } ] } ] } = block
5252 end
@@ -56,9 +56,9 @@ defmodule Gradient.AstSpecifierTest do
5656
5757 [ block , inline | _ ] = AstSpecifier . run_mappers ( ast , tokens ) |> Enum . reverse ( )
5858
59- assert { :function , 2 , :atom , 0 , [ { :clause , 2 , [ ] , [ ] , [ { :atom , 2 , :ok } ] } ] } = inline
59+ assert { :function , 2 , :atom , 0 , [ { :clause , 2 , [ ] , [ ] , [ { :atom , [ location: { 2 , 17 } , end_location: { 2 , 19 } ] , :ok } ] } ] } = inline
6060
61- assert { :function , 4 , :atom_block , 0 , [ { :clause , 4 , [ ] , [ ] , [ { :atom , 5 , :ok } ] } ] } = block
61+ assert { :function , 4 , :atom_block , 0 , [ { :clause , 4 , [ ] , [ ] , [ { :atom , [ location: { 5 , 5 } , end_location: { 5 , 7 } ] , :ok } ] } ] } = block
6262 end
6363
6464 test "char" do
@@ -516,10 +516,10 @@ defmodule Gradient.AstSpecifierTest do
516516 { tokens , _ } = example_data ( )
517517 opts = [ end_line: - 1 ]
518518
519- assert { { :integer , 21 , 12 } , tokens } =
519+ assert { { :integer , [ location: { 21 , 9 } , end_location: { 21 , 11 } ] , 12 } , tokens } =
520520 AstSpecifier . specify_line ( { :integer , 21 , 12 } , tokens , opts )
521521
522- assert { { :integer , 22 , 12 } , _tokens } =
522+ assert { { :integer , [ location: { 22 , 5 } , end_location: { 22 , 7 } ] , 12 } , _tokens } =
523523 AstSpecifier . specify_line ( { :integer , 20 , 12 } , tokens , opts )
524524 end
525525
@@ -1043,8 +1043,8 @@ defmodule Gradient.AstSpecifierTest do
10431043 [
10441044 { :map , 7 ,
10451045 [
1046- { :map_field_assoc , 7 , { :atom , 7 , : a} , { :integer , 7 , 12 } } ,
1047- { :map_field_assoc , 7 , { :atom , 7 , : b} , { :call , 7 , { :atom , 7 , :empty_map } , [ ] } }
1046+ { :map_field_assoc , 7 , { :atom , { :atom , [ location: { 7 , 7 } , end_location: { 7 , 8 } ] , : a} , :a } , { :integer , { :atom , [ location: { 7 , 10 } , end_location: { 7 , 12 } ] , :a } , 12 } } ,
1047+ { :map_field_assoc , 7 , { :atom , [ location: { 7 , 14 } , end_location: { 7 , 15 } ] , : b} , { :call , [ location: { 7 , 17 } , end_location: { 7 , 27 } ] , { :atom , 7 , :empty_map } , [ ] } }
10481048 ] }
10491049 ] }
10501050 ] } = test_map
@@ -1633,13 +1633,13 @@ defmodule Gradient.AstSpecifierTest do
16331633 { tokensB , astB } = load ( "Elixir.NestedModules.ModuleB.beam" , "nested_modules.ex" )
16341634 { tokens , ast } = load ( "Elixir.NestedModules.beam" , "nested_modules.ex" )
16351635
1636- assert { :function , 3 , :name , 0 , [ { :clause , 3 , [ ] , [ ] , [ { :atom , 4 , :module_a } ] } ] } =
1636+ assert { :function , 3 , :name , 0 , [ { :clause , 3 , [ ] , [ ] , [ { :atom , [ location: { 4 , 7 } , end_location: { 4 , 15 } ] , :module_a } ] } ] } =
16371637 List . last ( AstSpecifier . run_mappers ( astA , tokensA ) )
16381638
1639- assert { :function , 9 , :name , 0 , [ { :clause , 9 , [ ] , [ ] , [ { :atom , 10 , :module_b } ] } ] } =
1639+ assert { :function , 9 , :name , 0 , [ { :clause , 9 , [ ] , [ ] , [ { :atom , [ location: { 10 , 7 } , end_location: { 10 , 15 } ] , :module_b } ] } ] } =
16401640 List . last ( AstSpecifier . run_mappers ( astB , tokensB ) )
16411641
1642- assert { :function , 14 , :name , 0 , [ { :clause , 14 , [ ] , [ ] , [ { :atom , 15 , :module } ] } ] } =
1642+ assert { :function , 14 , :name , 0 , [ { :clause , 14 , [ ] , [ ] , [ { :atom , [ location: { 15 , 5 } , end_location: { 15 , 11 } ] , :module } ] } ] } =
16431643 List . last ( AstSpecifier . run_mappers ( ast , tokens ) )
16441644 end
16451645
0 commit comments