Parser Error: Expected end of statement after variable declaration, found "Identifier" instead

Godot Version

v4.2.1

Question

i got in var is_casting = false setget set_is_casting():
here all the code:
extends RayCast2D

var is_casting = false setget set_is_casting():

Called when the node enters the scene tree for the first time.

func _ready():
pass # Replace with function body.

Called every frame. ‘delta’ is the elapsed time since the previous frame.

func _process(delta):
pass

func _physics_process(delta: float)-> void:
var cast_point := target_position
force_raycast_update()

if is_colliding():
	cast_point = to_local(get_collision_point())


$Line2D.points[1] = cast_point

func set_is_casting(cast: bool) → void:
is_casting = cast

The GDScript language relies on consistent spacing/indentation of code.
We cannot tell what the issue is because you posted code without using the tags that properly format the code.
You need to post code properly using the </> menu item.