Changeset View
Changeset View
Standalone View
Standalone View
duchain/helper.cpp
Show First 20 Lines • Show All 441 Lines • ▼ Show 20 Line(s) | 429 | { | |||
---|---|---|---|---|---|
442 | } else if (parameterType->boolType != -1) { | 442 | } else if (parameterType->boolType != -1) { | ||
443 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeBoolean)); | 443 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeBoolean)); | ||
444 | } else if (parameterType->floatType != -1) { | 444 | } else if (parameterType->floatType != -1) { | ||
445 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeFloat)); | 445 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeFloat)); | ||
446 | } else if (parameterType->intType != -1) { | 446 | } else if (parameterType->intType != -1) { | ||
447 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeInt)); | 447 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeInt)); | ||
448 | } else if (parameterType->stringType != -1) { | 448 | } else if (parameterType->stringType != -1) { | ||
449 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeString)); | 449 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeString)); | ||
450 | } else if (parameterType->callableType != -1) { | ||||
451 | type = AbstractType::Ptr(new IntegralTypeExtended(IntegralTypeExtended::TypeCallable)); | ||||
450 | } else if (parameterType->iterableType != -1) { | 452 | } else if (parameterType->iterableType != -1) { | ||
451 | DeclarationPointer traversableDecl = findDeclarationImportHelper(currentContext, QualifiedIdentifier("traversable"), ClassDeclarationType); | 453 | DeclarationPointer traversableDecl = findDeclarationImportHelper(currentContext, QualifiedIdentifier("traversable"), ClassDeclarationType); | ||
452 | 454 | | |||
453 | if (traversableDecl) { | 455 | if (traversableDecl) { | ||
454 | UnsureType::Ptr unsure(new UnsureType()); | 456 | UnsureType::Ptr unsure(new UnsureType()); | ||
455 | AbstractType::Ptr arrayType = AbstractType::Ptr(new IntegralType(IntegralType::TypeArray)); | 457 | AbstractType::Ptr arrayType = AbstractType::Ptr(new IntegralType(IntegralType::TypeArray)); | ||
456 | unsure->addType(arrayType->indexed()); | 458 | unsure->addType(arrayType->indexed()); | ||
457 | unsure->addType(traversableDecl->abstractType()->indexed()); | 459 | unsure->addType(traversableDecl->abstractType()->indexed()); | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |