Changeset 993bd3a in OpenModelica


Ignore:
Timestamp:
2016-02-01T20:24:23+01:00 (8 years ago)
Author:
hkiel <henning.kiel@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
530076c
Parents:
e2d5aa8
Message:

change some matchcontinue to match

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/Script/Binding.mo

    re2d5aa8 r993bd3a  
    7979//output String bindingExpression;
    8080 algorithm
    81   isBindingPossible := matchcontinue(client_list)
     81  isBindingPossible := match(client_list)
    8282   local
    8383     Client_e ce;
     
    8585    case {} then true;
    8686    case ce::rest
    87       equation
    88        // inferBindingClient(ce);
     87      //guard inferBindingClient(ce)
    8988        then inferBindingClientList(rest, vmodel, env);
    90    end matchcontinue;
     89   end match;
    9190end inferBindingClientList;
    9291
     
    149148output Boolean isM;
    150149  algorithm
    151  isM := matchcontinue(clients)
     150 isM := match(clients)
    152151   local
    153152     String className;
     
    156155    case {} then {};
    157156    case CLIENT(className, instance)::rest
    158       equation
    159        className = name;
     157      guard
     158       stringEq(className, name)
    160159        then true;
    161160    case _::rest
    162161        then specifiesBindingFor(name, rest);
    163    end matchcontinue;
     162   end match;
    164163end getProviders; */
    165164
     
    232231output List<Mediator> m;
    233232algorithm
    234   (isClient, m) := matchcontinue(mediators)
     233  (isClient, m) := match(mediators)
    235234   local
    236235     String name;
     
    242241    case {} then (false, {});
    243242    case MEDIATOR(name, mType, template, clients, providers)::rest
     243      guard
     244        isClientInMediator(ci_name, clients)
    244245      equation
    245         true = isClientInMediator(ci_name, clients);
    246246        print("... found client : "+ ci_name +"\n");
    247247        then (true, {MEDIATOR(name, mType, template, clients, providers)});
    248248    case _::rest
    249249        then isClient(ci_name, rest);
    250    end matchcontinue;
     250   end match;
    251251end isClient;
    252252
     
    257257algorithm
    258258
    259   isClient := matchcontinue(clients)
     259  isClient := match(clients)
    260260   local
    261261      list<Absyn.Class> parents;
     
    265265    case {} then (false);
    266266    case CLIENT(name, _)::rest
    267       equation
    268         true = (name == ci_name);
     267      guard stringEq(name, ci_name)
    269268        then true;
    270269    case _::rest
    271270        then isClientInMediator(ci_name, rest);
    272    end matchcontinue;
     271   end match;
    273272end isClientInMediator;
    274273
     
    280279output Boolean isM;
    281280  algorithm
    282  isM := matchcontinue(clients)
     281 isM := match(clients)
    283282   local
    284283     String className;
     
    287286    case {} then false;
    288287    case CLIENT(className, instance)::rest
    289       equation
    290        className = name;
     288      guard
     289       stringEq(className, name)
    291290        then true;
    292291    case _::rest
    293292        then specifiesBindingFor(name, rest);
    294    end matchcontinue;
     293   end match;
    295294end specifiesBindingFor;
    296295
     
    409408output  String val;
    410409  algorithm
    411   val := matchcontinue(argNames)
     410  val := match(argNames)
    412411   local
    413412    String str, nname;
     
    416415        then "";
    417416    case Absyn.NAMEDARG(nname, Absyn.STRING(str))::rest
    418         equation
    419            nname = name;
     417        guard
     418           stringEq(nname, name)
    420419        then str;
    421420    case _::rest
    422421        then getArg(rest, name);
    423    end matchcontinue;
     422   end match;
    424423end getArg;
    425424
     
    430429output Option<SCode.Mod> mods;
    431430  algorithm
    432   (result, mods) := matchcontinue(elems)
     431  (result, mods) := match(elems)
    433432   local
    434433     list<SCode.Element> rest;
     
    442441    case el::rest
    443442        then isMediator(rest);
    444    end matchcontinue;
     443   end match;
    445444end isMediator;
    446445
Note: See TracChangeset for help on using the changeset viewer.