File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
src/main/kotlin/io/runescript/plugin/lang/psi/type/inference Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Add breadcrumbs and sticky lines support
6
6
- Add support for IntelliJ 2025.
7
+ - Add support for optional boolean argument in cc_create
7
8
8
9
## [ 1.7.1] - 2025-01-12
9
10
Original file line number Diff line number Diff line change @@ -246,4 +246,29 @@ data object DumpCommandHandler : CommandHandler {
246
246
247
247
o.type = RsPrimitiveType .STRING
248
248
}
249
+ }
250
+
251
+ data object CcCreateCommandHandler : CommandHandler {
252
+ override fun RsTypeInferenceVisitor.inferTypes (
253
+ reference : RsScript ,
254
+ o : RsCommandExpression
255
+ ) {
256
+ val arguments = o.argumentList.expressionList
257
+ val parameterTypes = if (arguments.size == 4 ) {
258
+ arrayOf<RsType >(
259
+ RsPrimitiveType .COMPONENT ,
260
+ RsPrimitiveType .INT ,
261
+ RsPrimitiveType .INT ,
262
+ RsPrimitiveType .BOOLEAN
263
+ )
264
+ } else {
265
+ arrayOf<RsType >(
266
+ RsPrimitiveType .COMPONENT ,
267
+ RsPrimitiveType .INT ,
268
+ RsPrimitiveType .INT
269
+ )
270
+ }
271
+ checkArgumentList(o.argumentList, parameterTypes)
272
+ o.type = RsUnitType
273
+ }
249
274
}
Original file line number Diff line number Diff line change @@ -726,6 +726,7 @@ private fun RsScript.findCommandHandler(): CommandHandler {
726
726
" db_find_refine_with_count" -> DbFindCommandHandler .DB_FIND_REFINE_WITH_COUNT
727
727
" db_getfield" -> DbGetFieldCommandHandler
728
728
" dump" -> DumpCommandHandler
729
+ " cc_create" , " .cc_create" -> CcCreateCommandHandler
729
730
else -> DefaultCommandHandler
730
731
}
731
732
}
You can’t perform that action at this time.
0 commit comments