behaviorTamplateString()

in src/langs/swift/combinator.js [870:889]


  behaviorTamplateString(emitter, behavior) {
    let tmp = [];
    behavior.items.forEach(item => {
      let emit = new Emitter(this.config);
      if (item.dataType instanceof TypeString) {
        this.grammer(emit, item, false, false);
        if (item.type !== 'string') {
          emit.output = `(${emit.output})`;
        }
      } else {
        emit.emit('String(');
        this.grammer(emit, item, false, false);
        emit.emit(')');
      }
      if (emit.output && emit.output !== '""') {
        tmp.push(emit.output);
      }
    });
    emitter.emit(tmp.join(' + '));
  }