From 1a50d292e46d9fccf1ccb38e5ffa2e57e232c8ce Mon Sep 17 00:00:00 2001 From: Claire Foster Date: Sat, 3 Jun 2023 16:47:01 +1000 Subject: [PATCH] Small fix to make JuliaSyntax work when Int === Int32 Also add 32 bit arches to CI. --- .github/workflows/CI.yml | 15 ++++++++++++++- src/syntax_tree.jl | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index faa5a2ea..588a3264 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,6 +22,7 @@ jobs: - '1.5' - '1.6' - '1.7' + - '1.8' - '1' - 'nightly' os: @@ -29,9 +30,10 @@ jobs: - macOS-latest - windows-latest arch: + - x86 - x64 exclude: - # Test all OS's on + # Test all OS's and arch possibilities on # - 1.0 # - 1.6 # - 1 @@ -44,12 +46,23 @@ jobs: - {os: 'macOS-latest', version: '1.4'} - {os: 'macOS-latest', version: '1.5'} - {os: 'macOS-latest', version: '1.7'} + - {os: 'macOS-latest', version: '1.8'} + # MacOS not available on x86 + - {os: 'macOS-latest', arch: 'x86'} - {os: 'windows-latest', version: '1.1'} - {os: 'windows-latest', version: '1.2'} - {os: 'windows-latest', version: '1.3'} - {os: 'windows-latest', version: '1.4'} - {os: 'windows-latest', version: '1.5'} - {os: 'windows-latest', version: '1.7'} + - {os: 'windows-latest', version: '1.8'} + - {os: 'ubuntu-latest', version: '1.1', arch: 'x86'} + - {os: 'ubuntu-latest', version: '1.2', arch: 'x86'} + - {os: 'ubuntu-latest', version: '1.3', arch: 'x86'} + - {os: 'ubuntu-latest', version: '1.4', arch: 'x86'} + - {os: 'ubuntu-latest', version: '1.5', arch: 'x86'} + - {os: 'ubuntu-latest', version: '1.7', arch: 'x86'} + - {os: 'ubuntu-latest', version: '1.8', arch: 'x86'} steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 diff --git a/src/syntax_tree.jl b/src/syntax_tree.jl index 9558f9bf..87fa6c27 100644 --- a/src/syntax_tree.jl +++ b/src/syntax_tree.jl @@ -79,7 +79,7 @@ function _to_SyntaxNode(source::SourceFile, raw::GreenNode{SyntaxHead}, if !is_trivia(rawchild) || is_error(rawchild) push!(cs, _to_SyntaxNode(source, rawchild, pos, keep_parens)) end - pos += rawchild.span + pos += Int(rawchild.span) end if !keep_parens && kind(raw) == K"parens" && length(cs) == 1 return cs[1]