Skip to content

Instantly share code, notes, and snippets.

View brankoajzele's full-sized avatar

Branko Ajzele brankoajzele

View GitHub Profile
@brankoajzele
brankoajzele / operatorCharacters.swift
Created September 2, 2017 19:44 — forked from natecook1000/operatorCharacters.swift
Allowed characters for Swift operators
import Foundation
extension UnicodeScalar : ForwardIndexType {
public func successor() -> UnicodeScalar {
return UnicodeScalar(value + 1)
}
}
var operatorHeads: [UnicodeScalar] = Array("=-+!*%<>&|^~?".unicodeScalars)
operatorHeads += Array("\u{00A1}" ... "\u{00A7}")
foreach ($items as $delta => $item) {
// suppress all children so this field is not rendered
if ($field['type'] == 'list_boolean') {
$classes_array[] = drupal_html_class($field['settings']['allowed_values'][$item['value']]);
}
elseif ($field['type'] == 'taxonomy_term_reference') {
$tids[] = $item['tid']; //store the terms ids and just do taxonomy_term_load_multiple once at the end
}
else {
$classes_array[] = drupal_html_class($item['value']);