Resolve merge conflicts with devel branch refactoring (#25423)

The PR branch had merge conflicts with `devel` due to a major compiler
refactoring that extracted type definitions from `compiler/ast.nim` into
a new `compiler/astdef.nim` file.

## Changes

- Resolved conflict in `compiler/ast.nim` by accepting `devel`'s
refactored structure
- Merged 763 commits from `devel` branch (commit range:
`ce6a345..b3273e7`)
- Preserved original PR changes removing deprecated symbols from
`lib/core/macros.nim`

The core PR functionality (removal of deprecated macros API since
v0.18.1) remains intact while incorporating the upstream AST
refactoring.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-09 20:06:36 +08:00
committed by GitHub
parent 7f9c470212
commit 47d3fb28bd
191 changed files with 10591 additions and 3225 deletions

View File

@@ -1,11 +1,33 @@
discard """
output: "DabcD"
targets: "c cpp js"
output: '''
DabcD
(8192, 8, 1024)
'''
"""
const
x = "abc"
import std/assertions
var v = "D" & x & "D"
block:
const
x = "abc"
echo v
var v = "D" & x & "D"
doAssert v == "DabcD"
echo v
block: # test large additions
var a = "abcdefgh"
let initialLen = a.len
let times = 10
for i in 1..times:
let start = a.len
a.add(a)
doAssert a.len == 2 * start
let multiplier = 1 shl times
doAssert a.len == initialLen * multiplier
echo (a.len, initialLen, multiplier)
for i in 1 ..< multiplier:
for j in 0 ..< initialLen:
doAssert a[j] == a[i * initialLen + j]