Remove variable_declaration (for now)
parent
52895adec5
commit
fff36ad73b
|
@ -132,8 +132,8 @@ module CeleryScript
|
|||
# catch unbound identifiers
|
||||
var = resolve_variable!(value)
|
||||
case var.kind
|
||||
when "variable_declaration"
|
||||
actual = var.args[:data_value].kind
|
||||
when "parameter_declaration"
|
||||
actual = var.args[:default_value].kind
|
||||
# Don't delete this- it is currently unreachable code, but as soon as we
|
||||
# allow identifiers other than `point`, `tool` and `coordinate` we will
|
||||
# need it again (and can write tests)
|
||||
|
|
|
@ -76,7 +76,7 @@ module CeleryScriptSettingsBag
|
|||
ONLY_ONE_COORD = "Move Absolute does not accept a group of locations"\
|
||||
" as input. Please change your selection to a "\
|
||||
"single location."
|
||||
SCOPE_DECLARATIONS = [:variable_declaration, :parameter_declaration]
|
||||
SCOPE_DECLARATIONS = [ :parameter_declaration ]
|
||||
ALLOWED_EVERY_POINT_TYPE = %w(Tool GenericPointer Plant ToolSlot)
|
||||
BAD_EVERY_POINT_TYPE = '"%s" is not a type of group. Allowed values: %s'
|
||||
|
||||
|
@ -246,7 +246,6 @@ module CeleryScriptSettingsBag
|
|||
.node(:remove_farmware, [:package])
|
||||
.node(:scope_declaration, [], SCOPE_DECLARATIONS)
|
||||
.node(:identifier, [:label])
|
||||
.node(:variable_declaration, [:label, :data_value], []) # <= duplicate nodes
|
||||
.node(:parameter_application, [:label, :data_value], []) # <= not a mistake - RC
|
||||
.node(:parameter_declaration, [:label, :default_value], [])
|
||||
.node(:set_servo_angle, [:pin_number, :pin_value], [])
|
||||
|
|
|
@ -138,7 +138,7 @@ describe Api::SequencesController do
|
|||
post :create, body: input.to_json, params: {format: :json}
|
||||
expect(response.status).to eq(422)
|
||||
expctd =
|
||||
"Expected one of: [:variable_declaration, :parameter_declaration]"
|
||||
"Expected one of: [:parameter_declaration]"
|
||||
expect(json[:body]).to include(expctd)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue