Files
five/hbrtl/typecheck.go
Charles KWON OhJun 59568f3301 Five v0.9 — Harbour + Go fusion language
- Compiler: PP → Lexer → Parser → Analyzer → Gengo pipeline
- Parser: 232/236 (98%) Harbour compatibility, registry-based dispatch
- RTL: 351 Harbour-compatible functions
- RDD: DBF/NTX/CDX engines with Rushmore bitmap optimization
- Go Interop: IMPORT + pkg.Func() + obj:Method() with FastPath (15M calls/sec)
- HB_FUNC API: Full Harbour C API compatible Go bridge
- Concurrency: SPAWN/LAUNCH/GOROUTINE, <-, WATCH, PARALLEL FOR, ASYNC/AWAIT
- Extensions: Multi-return, DEFER, Slice, f-string, Nil-safe ?:, CONST
- Macro Compiler: Runtime AST parsing and evaluation
- Debugger: TUI debugger with source display, breakpoints, stepping
- FRB: Native + Pcode dual mode runtime binary
- Tests: 13 packages ALL PASS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 09:41:50 +09:00

84 lines
1.6 KiB
Go

// Copyright (c) 2026 Charles KWON OhJun (charleskwonohjun@gmail.com)
// All rights reserved.
// Type checking functions: HB_ISARRAY, HB_ISBLOCK, HB_ISCHAR, HB_ISDATE,
// HB_ISDATETIME, HB_ISLOGICAL, HB_ISNUMERIC, HB_ISOBJECT, HB_ISHASH,
// HB_ISNIL, HB_ISPOINTER, HB_ISSTRING
package hbrtl
import "five/hbrt"
func HbIsArray(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsArray())
}
func HbIsBlock(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsBlock())
}
func HbIsChar(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsString())
}
func HbIsDate(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsDate())
}
func HbIsDateTime(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsTimestamp())
}
func HbIsLogical(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsLogical())
}
func HbIsNumeric(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsNumeric())
}
func HbIsObject(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsObject())
}
func HbIsHash(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsHash())
}
func HbIsNil(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsNil())
}
func HbIsPointer(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsPointer())
}
// HB_ISSTRING is alias for HB_ISCHAR
func HbIsString(t *hbrt.Thread) {
t.Frame(1, 0)
defer t.EndProc()
t.RetBool(t.Local(1).IsString())
}